github.com/traefik/yaegi@v0.15.1/_test/method10.go (about)

     1  package main
     2  
     3  const BlockSize = 8
     4  
     5  type Cipher struct{}
     6  
     7  func (c *Cipher) BlockSize() int { return BlockSize }
     8  
     9  func main() {
    10  	println(BlockSize)
    11  	s := Cipher{}
    12  	println(s.BlockSize())
    13  }
    14  
    15  // Output:
    16  // 8
    17  // 8