...
Run Format

Source file src/go/doc/testdata/error2.go

Documentation: go/doc/testdata

     1  // Copyright 2012 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 error2
     6  
     7  type I0 interface {
     8  	// When embedded, the locally-declared error interface
     9  	// is only visible if all declarations are shown.
    10  	error
    11  }
    12  
    13  type T0 struct {
    14  	ExportedField interface {
    15  		// error should not be visible
    16  		error
    17  	}
    18  }
    19  
    20  type S0 struct {
    21  	// In struct types, an embedded error must only be visible
    22  	// if AllDecls is set.
    23  	error
    24  }
    25  
    26  // This error declaration shadows the predeclared error type.
    27  type error interface {
    28  	Error() string
    29  }
    30  

View as plain text