Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thedevsaddam/unpack
Go assignment by slice, array unpacking or destructuring
https://github.com/thedevsaddam/unpack
destructuring golang unpack unpack-go
Last synced: 4 months ago
JSON representation
Go assignment by slice, array unpacking or destructuring
- Host: GitHub
- URL: https://github.com/thedevsaddam/unpack
- Owner: thedevsaddam
- License: mit
- Created: 2020-04-21T11:32:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-21T13:46:53.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T16:50:27.473Z (8 months ago)
- Topics: destructuring, golang, unpack, unpack-go
- Language: Go
- Size: 3.91 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
Unpack
---
[](https://travis-ci.org/thedevsaddam/unpack)
[](https://github.com/thedevsaddam/unpack/releases)
[](https://goreportcard.com/report/github.com/thedevsaddam/unpack)
[](https://coveralls.io/github/thedevsaddam/unpack)
[](https://pkg.go.dev/github.com/thedevsaddam/unpack)
[](LICENSE.md)Go assignment by slice, array unpacking or destructuring
### Installation
Install the package using
```go
$ go get github.com/thedevsaddam/unpack
```### Usage
To use the package import it in your `*.go` code
```go
import "github.com/thedevsaddam/unpack"
```Let's see a quick example:
```go
package mainimport (
"fmt""github.com/thedevsaddam/unpack"
)func main() {
names := []string{"Captain Jack Sparrow", "Tom", "Jerry"}
var jack, tom string
unpack.Do(names, &jack, &tom)
fmt.Println("I'm", jack)
}
```## Bugs and Issues
If you encounter any bugs or issues, feel free to [open an issue at
github](https://github.com/thedevsaddam/unpack/issues).Also, you can shoot me an email to
for hugs or bugs.## Contribution
If you are interested to make the package better please send pull requests or create an issue so that others can fix.
[Read the contribution guide here](CONTRIBUTING.md)## License
The **unpack** is an open-source software licensed under the [MIT License](LICENSE.md).