Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 main

import (
"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"
```