https://github.com/gotilty/gotil
lodash inspired utility library for go
https://github.com/gotilty/gotil
array functional go golang helpers lodash programming slice utility
Last synced: about 21 hours ago
JSON representation
lodash inspired utility library for go
- Host: GitHub
- URL: https://github.com/gotilty/gotil
- Owner: gotilty
- License: mit
- Created: 2022-03-26T13:56:57.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T20:57:09.000Z (over 2 years ago)
- Last Synced: 2024-06-19T06:56:46.718Z (over 1 year ago)
- Topics: array, functional, go, golang, helpers, lodash, programming, slice, utility
- Language: Go
- Homepage: https://gotilty.github.io/gotil
- Size: 347 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gotil
[methods](https://github.com/gotilty/gotil/wiki/methods) | [wiki](https://github.com/gotilty/gotil/wiki) | [documentation](https://gotilty.github.io/gotil/#/)
lodash inspired utility library for go

------------
[](https://scrutinizer-ci.com/g/gotilty/gotil/build-status/master)
[](https://www.codefactor.io/repository/github/gotilty/gotil)
[](https://goreportcard.com/report/github.com/gotilty/gotil)



------------
## ⚙️ Installation
Make sure you have Go installed ([download](https://go.dev/dl/)). Version `1.18` or higher is required.
Initialize your project by creating a folder and then running `go mod init github.com/your/repo` ([learn more](https://go.dev/blog/using-go-modules)) inside the folder. Then install Gotil with the [`go get`](https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
```bash
go get -u github.com/gotilty/gotil
```
## Run on Local
### Step 1: git clone this repository [gotilty/gotil@github](https://github.com/gotilty/gotil)
```
git clone https://github.com/gotilty/gotil.git
```
Go to project folder
```
cd gotil
```
### Step 2: run test
```
go test -v ./...
```
### Step 3: run benchmarks
```
go test -v ./... -bench=. -run=xxx -benchmem
```
## 🎯 Why GOtil?
GOtil makes go easier by taking the hassle out of working with arrays,
numbers, objects, strings, etc. GOtil's modular methods are great for:
- Iterating arrays, objects, & strings
- Manipulating & testing values
- Creating composite functions
## 👀 Examples
Listed below are some of the common examples. If you want to see more code examples , please visit our [Recipes repository](https://github.com/gotilty/gotil) or visit our hosted [API documentation](https://gotilty.github.io/gotil/#/).
#### 📖 [**Each**]
```go
gotil.Each([]string{"gotilty", "gotil"}, func(v string) {
fmt.Fprint(os.Stdout, v)
})
// Output: gotiltygotil
```
## TODO
- [x] Readme File
- [x] Go Doc
- [x] ApiDoc
- [x] Tests