https://github.com/appleboy/com
This is an open source project for commonly used functions for the Go programming language.
https://github.com/appleboy/com
golang
Last synced: 9 months ago
JSON representation
This is an open source project for commonly used functions for the Go programming language.
- Host: GitHub
- URL: https://github.com/appleboy/com
- Owner: appleboy
- License: mit
- Created: 2016-12-09T02:14:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-29T07:16:40.000Z (12 months ago)
- Last Synced: 2025-04-10T08:33:08.044Z (9 months ago)
- Topics: golang
- Language: Go
- Size: 77.1 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Common Functions
[](https://github.com/appleboy/com/actions/workflows/go.yml)
[](https://godoc.org/github.com/appleboy/com)
[](https://codecov.io/gh/appleboy/com)
[](https://goreportcard.com/report/github.com/appleboy/com)
This is an open source project for commonly used functions for the [Go programming language](https://golang.org/).
## Feature
* [x] Random
* [x] Array
* [x] File
* [x] Convert
## Benchmrk
```sh
goos: linux
goarch: amd64
pkg: github.com/appleboy/com/array
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
BenchmarkArrayInMap
BenchmarkArrayInMap-2 411962 8343 ns/op 5224 B/op 8 allocs/op
BenchmarkArrayInSlice
BenchmarkArrayInSlice-2 4165724 863.8 ns/op 0 B/op 0 allocs/op
BenchmarkIn
BenchmarkIn-2 4610620 776.3 ns/op 1792 B/op 1 allocs/op
BenchmarkInArray
BenchmarkInArray-2 388922 9177 ns/op 1624 B/op 101 allocs/op
PASS
ok github.com/appleboy/com/array 16.040s
goos: linux
goarch: amd64
pkg: github.com/appleboy/com/convert
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
BenchmarkCountParamsOld
BenchmarkCountParamsOld-2 2575500 1400 ns/op 0 B/op 0 allocs/op
BenchmarkCountParamsNew
BenchmarkCountParamsNew-2 33431834 108.5 ns/op 0 B/op 0 allocs/op
BenchmarkBytesToStrOld01
```