Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iawia002/ut
The missing utility library for Go
https://github.com/iawia002/ut
go golang utility
Last synced: 3 months ago
JSON representation
The missing utility library for Go
- Host: GitHub
- URL: https://github.com/iawia002/ut
- Owner: iawia002
- License: mit
- Created: 2018-07-13T10:02:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-14T02:51:48.000Z (over 6 years ago)
- Last Synced: 2024-06-20T13:32:16.530Z (7 months ago)
- Topics: go, golang, utility
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ut
[![Build Status](https://travis-ci.com/iawia002/ut.svg?branch=master)](https://travis-ci.com/iawia002/ut)
[![codecov](https://codecov.io/gh/iawia002/ut/branch/master/graph/badge.svg)](https://codecov.io/gh/iawia002/ut)
[![GoDoc](https://godoc.org/github.com/iawia002/ut?status.svg)](https://godoc.org/github.com/iawia002/ut)The missing utility library for Go.
## Installation
```
go get github.com/iawia002/ut
```## Usage
```go
package mainimport (
"fmt""github.com/iawia002/ut"
)func main() {
fmt.Println(ut.Reverse("54321")) // 12345
}
```## Examples
```go
gore> :import github.com/iawia002/ut
gore> ut.Reverse("12345")
"54321"
gore> ut.Range(0, 5)
[]int{0, 1, 2, 3, 4, 5}
gore> ut.TrimSpace("1 2\n3\t45")
"12345"
gore> ut.Domain("hello.com")
"hello"
gore> ut.ItemInSlice("a", []string{"a", "b", "c"})
true
gore> ut.Md5("123")
"202cb962ac59075b964b07152d234b70"
```