Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Types

Types uses reflection and other internal packages to extends the functionality of existing data structures and provides implementations of other common data structures

What data structures are supported by Types?

Types provides implementations of structs, lists, and queues Support for data structures such sets, stacks, and dictionaries/maps coming soon!

Installation (Package)

$ go get github.com/ShockNode/types

Usage

import "github.com/ShockNode/types/structs"

type S struct {

  Id int
  Name string

}

s := &S{Id: 1, Name: "Brent"}

//Valid. Returns *field, error
f1, err := types.Struct(s).FieldByName("Name")

//Also valid. Also returns *field, error
f2, err := structs.Struct(s).FieldByIndex(0)

err = f1.Set("B. Ray")

fmt.Printf("Name of struct field at index 0: %s", f2.Name())

Development:

Types is under active development. Most things will remain the same, but nonetheless minor changes will occur.

Contributors
Brent Ray (Owner)

About

utility functions for Go types based on reflect package

Resources

Packages

No packages published