1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 // Animal has a Name and an Age to represent an animal.
19 // String makes Animal satisfy the Stringer interface.
20 func (a Animal
) String() string {
21 return fmt
.Sprintf("%v (%d)", a
.Name
, a
.Age
)
24 func ExampleStringer() {