Value represents a declared constant.
| 306 | |
| 307 | // Value represents a declared constant. |
| 308 | type Value struct { |
| 309 | comment string |
| 310 | originalName string // The name of the constant. |
| 311 | name string // The name with trimmed prefix. |
| 312 | // The value is stored as a bit pattern alone. The boolean tells us |
| 313 | // whether to interpret it as an int64 or a uint64; the only place |
| 314 | // this matters is when sorting. |
| 315 | // Much of the time the str field is all we need; it is printed |
| 316 | // by Value.String. |
| 317 | value uint64 // Will be converted to int64 when needed. |
| 318 | signed bool // Whether the constant is a signed type. |
| 319 | str string // The string representation given by the "go/constant" package. |
| 320 | } |
| 321 | |
| 322 | func (v *Value) String() string { |
| 323 | return v.str |
nothing calls this directly
no outgoing calls
no test coverage detected