Skip to content

Commit

Permalink
add readMe description
Browse files Browse the repository at this point in the history
  • Loading branch information
calvin committed Jul 13, 2022
1 parent 9504f98 commit 6c36229
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# sugar
sugar is a comprehensive, efficient, and reusable util function library of go


## 💡 Usage

You can import `sugar` using:

```go
import (
"github.com/phuhao00/sugar"
)
```

Then use one of the helpers below:

```go
clamp := sugar.Clamp(2, 3, 5)
fmt.Printf("clamp:%v", clamp)
```
11 changes: 11 additions & 0 deletions z_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package sugar

import (
"fmt"
"testing"
)

func TestClamp(t *testing.T) {
clamp := Clamp(2, 3, 5)
fmt.Printf("clamp:%v", clamp)
}

0 comments on commit 6c36229

Please sign in to comment.