1// Copyright 2014 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 5// Package blank is a go/doc test for the handling of _. 6// See issue 5397. 7package blank 8 9import "os" 10 11type T int 12 13// T constants counting from a blank constant. 14const ( 15 _ T = iota 16 T1 17 T2 18) 19 20// T constants counting from unexported constants. 21const ( 22 tweedledee T = iota 23 tweedledum 24 C1 25 C2 26 alice 27 C3 28 redQueen int = iota 29 C4 30) 31 32// Constants with a single type that is not propagated. 33const ( 34 zero os.FileMode = 0 35 Default = 0644 36 Useless = 0312 37 WideOpen = 0777 38) 39 40// Constants with an imported type that is propagated. 41const ( 42 zero os.FileMode = 0 43 M1 44 M2 45 M3 46) 47 48// Package constants. 49const ( 50 _ int = iota 51 I1 52 I2 53) 54 55// Unexported constants counting from blank iota. 56// See issue 9615. 57const ( 58 _ = iota 59 one = iota + 1 60) 61 62// Blanks not in doc output: 63 64// S has a padding field. 65type S struct { 66 H uint32 67 _ uint8 68 A uint8 69} 70 71func _() {} 72 73type _ T 74 75var _ = T(55) 76