You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go

72 lines
1.0 KiB

2 years ago
package unstable
2 years ago
import "fmt"
2 years ago
// Kind represents the type of TOML structure contained in a given Node.
2 years ago
type Kind int
const (
2 years ago
// Meta
2 years ago
Invalid Kind = iota
Comment
Key
2 years ago
// Top level structures
2 years ago
Table
ArrayTable
KeyValue
2 years ago
// Containers values
2 years ago
Array
InlineTable
2 years ago
// Values
2 years ago
String
Bool
Float
Integer
LocalDate
LocalTime
LocalDateTime
DateTime
)
2 years ago
// String implementation of fmt.Stringer.
2 years ago
func (k Kind) String() string {
switch k {
case Invalid:
return "Invalid"
case Comment:
return "Comment"
case Key:
return "Key"
case Table:
return "Table"
case ArrayTable:
return "ArrayTable"
case KeyValue:
return "KeyValue"
case Array:
return "Array"
case InlineTable:
return "InlineTable"
case String:
return "String"
case Bool:
return "Bool"
case Float:
return "Float"
case Integer:
return "Integer"
case LocalDate:
return "LocalDate"
case LocalTime:
return "LocalTime"
case LocalDateTime:
return "LocalDateTime"
case DateTime:
return "DateTime"
}
panic(fmt.Errorf("Kind.String() not implemented for '%d'", k))
}