Skip to content

Commit 02bd9ec

Browse files
committed
Update documentation
1 parent 61b1a97 commit 02bd9ec

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
11
# GoFusion
22
GoFusion is a utility library for Go that provides a collection of useful functions to simplify and enhance your code. It is inspired by the popular JavaScript library Lodash, but built specifically for Go.
3+
4+
[![Go Reference](https://pkg.go.dev/badge/github.com/your-username/your-package-name.svg)](https://pkg.go.dev/github.com/vatsalpatel/gofusion)
5+
6+
## Installation
7+
8+
Use the following `go get` command to install the package:
9+
10+
```
11+
go get github.com/vatsalpatel/gofusion
12+
```
13+
14+
## Usage
15+
Import the package into your Go code:
16+
```
17+
import (
18+
ut github.com/vatsalpatel/gofusion
19+
)
20+
21+
func main() {
22+
mapp := map[string]interface{}{
23+
"key1": "value1",
24+
"key2": "value2",
25+
"key3": "value3",
26+
}
27+
ut.Keys[string](mapp)
28+
}
29+
30+
```
31+
32+
## Testing
33+
Run the following command:
34+
```
35+
go test
36+
```
37+
38+
39+
## Contributing
40+
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.
41+
42+
## License
43+
This project is licensed under the MIT License - see the LICENSE file for details.

maps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package fusion
22

3-
// Get returns the value if found, otherwise returns the zero value of the type
3+
// GetOrDefault returns the value if found, otherwise returns the provided default value
44
func GetOrDefault[T comparable, V any](m map[T]V, key T, defaultValue V) V {
55
value, ok := m[key]
66
if !ok {

0 commit comments

Comments
 (0)