On Friday, October 7, 2016 at 4:57:29 PM UTC-7, Ian Lance Taylor wrote:
>
> On Fri, Oct 7, 2016 at 4:18 PM, sbkim via golang-nuts
> > wrote:
> >
> > If an operand of fmt.Printf implements method String() string,
> fmt.Printf
> > respects it and uses it.
>
Hello group,
If an operand of fmt.Printf implements method String() string, fmt.Printf
respects
it and uses it.
But it doesn't if an operand is a a struct that has such an element.
For example, https://play.golang.org/p/QJC7Q9Kpch:
package main
import "fmt"
type Int int
func (i Int) String()
go/gocomments#TOC-Initialisms says initialisms or acronyms (e.g. "URL" or
"NATO") have a consistent case: URL or url.
But sometimes we have ToR (top-of-rack switch), QoS (quality of service),
or DoS (denial of service) that are commonly written with a combination of
upper- and lower-case letter
On Wednesday, August 24, 2016 at 10:22:22 PM UTC-7, Ian Lance Taylor wrote:
>
> On Wed, Aug 24, 2016 at 9:21 PM, sbkim via golang-nuts
> > wrote:
> > Hello group,
> >
> > Why are the following snippets errors?
> >
> > https://play.golang.org/p/m
Hello group,
Why are the following snippets errors?
https://play.golang.org/p/mgEYMNNw9h
type S struct {
i int
}
if S{i: 0} == S{} {
}
syntax error: unexpected == at end of statement
switch S{i: 0} == S{} {
}
syntax error: unexpected i, expecting case or default or }
It works without erro