Enumerating string constants with iota
问题 The following example defines a series of port numbers starting at 3333 using iota. package main import ( "fmt" ) const ( FirstPort = iota+3333 SecondPort ThirdPort ) func main() { hostAndPort := "localhost:"+fmt.Sprint(SecondPort) fmt.Printf("%s", hostAndPort ) // Output: // localhost:3334 } When combining hostname and ports, I'd like to avoid having to wrap the port constant in fmt.Sprint and simply write, for example, "localhost:"+SecondPort . Is there a way to use iota to define the port