1// Copyright 2016 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. 4 5package a 6 7type Mode uint 8 9func (m Mode) String() string { return "mode string" } 10func (m *Mode) Addr() *Mode { return m } 11 12type Stringer interface { 13 String() string 14} 15 16var global Stringer 17var m Mode 18 19func init() { 20 // force compilation of the (*Mode).String() wrapper 21 global = &m 22} 23 24func String() string { 25 return global.String() + Mode(0).String() 26} 27