github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/pkg/doc/testdata/integ/crypto/rand/rand.gno (about)

     1  package rand
     2  
     3  import (
     4  	"io"
     5  )
     6  
     7  // Crypto symbol.
     8  func Crypto() {}
     9  
    10  func NewWriter() io.Writer {}
    11  
    12  // A Rand is a test symbol for structs.
    13  type Rand struct {
    14  	Name     string   // comment1
    15  	Value    int      // comment2
    16  	Attempts bool     // comment3
    17  	unexp    chan int // comment4
    18  }
    19  
    20  type Rander interface {
    21  	Generate()
    22  }
    23  
    24  type RandEmbedder struct {
    25  	A string
    26  	Rand
    27  }
    28  
    29  // NewRand generates a new Rand.
    30  func NewRand() *Rand {
    31  	return nil
    32  }
    33  
    34  func (*Rand) Generate() {
    35  }
    36  
    37  // Flag is tested for constant doc.
    38  type Flag int
    39  
    40  // Common flag values.
    41  const (
    42  	FlagA Flag = 1 << iota
    43  	FlagB
    44  	FlagC
    45  )
    46  
    47  var FlagVar Flag = 9999
    48  
    49  var ExportedVar = true
    50  
    51  var unexp = 1