Hello,

considering this code

```
package main

import (
"fmt"
)

func main() {
host := []string{"127", "0", "0", "1"}

fmt.Printf("%v.%v.%v.%v\n", host[0], host[1], host[2], host[3])
fmt.Printf("%v.%v.%v.%v\n", host[0:4]...)
}
```

The first Printf works and prints the host value.
While the second one does not compile : "./args.go:11:34: cannot use 
host[0:4] (type []string) as type []interface {} in argument to fmt.Printf"

If I use append() instead of Printf(), this expanding of the host variables 
just works out. Is this a compiler bug in the case of the fmt.Printf() ?

Regards
Yves.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5fe08421-eaa4-4285-bd46-ecdfc5403465o%40googlegroups.com.

Reply via email to