mirror of
https://github.com/golang/go.git
synced 2025-05-08 09:03:04 +00:00
the raw fmt routines will be another, smaller but subtler pass. R=rsc DELTA=157 (0 added, 0 deleted, 157 changed) OCL=22851 CL=22851
19 lines
354 B
Go
19 lines
354 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
type T struct { a int; b string }
|
|
|
|
func (t *T) String() string {
|
|
return fmt.Sprint(t.a) + " " + t.b
|
|
}
|
|
|
|
func main() {
|
|
t := &T{77, "Sunset Strip"};
|
|
fmt.Println(t)
|
|
}
|