Skip to content

Commit 6c36229

Browse files
author
calvin
committed
add readMe description
1 parent 9504f98 commit 6c36229

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
# sugar
22
sugar is a comprehensive, efficient, and reusable util function library of go
3+
4+
5+
## 💡 Usage
6+
7+
You can import `sugar` using:
8+
9+
```go
10+
import (
11+
"github.com/phuhao00/sugar"
12+
)
13+
```
14+
15+
Then use one of the helpers below:
16+
17+
```go
18+
clamp := sugar.Clamp(2, 3, 5)
19+
fmt.Printf("clamp:%v", clamp)
20+
```

z_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package sugar
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
func TestClamp(t *testing.T) {
9+
clamp := Clamp(2, 3, 5)
10+
fmt.Printf("clamp:%v", clamp)
11+
}

0 commit comments

Comments
 (0)