multini/types/keyvalue.go

39 lines
622 B
Go
Raw Normal View History

2020-04-25 23:42:14 +00:00
package types
type KeyValue struct {
PrefixKey string
Key string
PostfixKey string
PrefixValue string
Value string
PostfixValue string
Comment Comment
}
func (obj *KeyValue) Full() string {
return obj.PrefixKey +
obj.Key +
obj.PostfixKey +
"=" +
obj.PrefixValue +
obj.Value +
obj.PostfixValue +
obj.Comment.Full()
}
func (obj *KeyValue) Line() string {
return obj.Full()
}
func (obj *KeyValue) Fulln() string {
return obj.Full() + endOfLine
}
func (obj *KeyValue) Type() TElement {
return TKeyValue
}
func (obj *KeyValue) Indent() string {
return obj.PrefixKey
}