No, but you can do better thing! You can declare a method which returns a constant. E.g.:
func (a A) GetRoot()(string) { return "MYroot" } Hope this helps, mate! Dne pátek 4. března 2016 23:40:09 UTC+1 krma...@gmail.com napsal(a): > > Something like > > > type A struct { > Root string const > Name string > } > > Where Root is a constant for this struct which never changes . > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.