Skip to content

sip fills a Go struct with data from any sources.

License

Notifications You must be signed in to change notification settings

yannickkirschen/sip

Repository files navigation

sip

Lint commit message Push Release GitHub release

sip fills a Go struct with data from any sources.

Warning

This project is currently under development and not stable.

Usage

type MyConfig struct {
 Profile string        `sip:"profile"`
 User    *MyUserConfig `sip:"user"`
}

type MyUserConfig struct {
 Username string `sip:"username"`
 Password string `sip:"password"`
}

func main() {
 config := &MyConfig{}
 prefix := "my"

 sip.RegisterFile("examples/my.json")
 if err := sip.Fill(config, prefix); err != nil {
  panic(err)
 }
}

About

sip fills a Go struct with data from any sources.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages