Search Gear Notes

Search Gear #14 – Pseudo Constructors!

Changed the config twitter caller to a pseudo constructor thus func NewTwitter(file string) (*twitter, error) { tw := new(twitter) var parser toml.Parser if _, err := ioutil.ReadFile(file); err != nil { tw.errors = errors.New(co.Lang(“could not find the configuration file, you’ll need to provide these setting for twitter to work”)) } else { toml := parser.ParseFile(file)…