package something import ( "fmt" "www.thenautilus.net/cgit/go-example/config" ) type Something struct { value int } func New(conf *config.SomethingConfig) Something { return Something{ value: conf.Value, } } func (s *Something) DoSomething() error { fmt.Printf("the value is %d", s.value) return nil }