unpack

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 1 Imported by: 0

README

Unpack

Build Status Project status Go Report Card Coverage Status GoDoc License

Go assignment by slice, array unpacking or destructuring

Installation

Install the package using

$ go get github.com/thedevsaddam/unpack

Usage

To use the package import it in your *.go code

import "github.com/thedevsaddam/unpack"

Let's see a quick example:

package main

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

Also, you can shoot me an email to mailto:thedevsaddam@gmail.com 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

License

The unpack is an open-source software licensed under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(src interface{}, dest ...interface{})

Do perform a destructuring on slice values

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL