Skip to content

Instantly share code, notes, and snippets.

@polds
Created January 14, 2014 09:07
Show Gist options
  • Save polds/8415373 to your computer and use it in GitHub Desktop.
Save polds/8415373 to your computer and use it in GitHub Desktop.
package config
type Conf struct {
User, Password String
}
package main
import (
"test"
"config"
)
func main() {
conf := config.Conf{"Test", "Password1234"}
// How do I use conf here?
test.Run()
}
package test
import (
"config"
"fmt"
)
func (conf Conf) Run() {
fmt.Println(conf.User)
fmt.Println(conf.Password)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment