github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/kit/modelgen/__examples__/consts.go (about)

     1  package example
     2  
     3  type Gender int
     4  
     5  const (
     6  	GenderMale Gender = iota + 1
     7  	GenderFemale
     8  )
     9  
    10  func (g Gender) String() string {
    11  	switch g {
    12  	case GenderMale:
    13  		return "male"
    14  	case GenderFemale:
    15  		return "female"
    16  	}
    17  	return ""
    18  }