ipld-eth-server/pkg/core/contract_attributes.go

21 lines
423 B
Go
Raw Normal View History

2017-12-04 22:54:35 +00:00
package core
type ContractAttribute struct {
Name string
Type string
}
type ContractAttributes []ContractAttribute
func (attributes ContractAttributes) Len() int {
return len(attributes)
}
func (attributes ContractAttributes) Swap(i, j int) {
attributes[i], attributes[j] = attributes[j], attributes[i]
}
func (attributes ContractAttributes) Less(i, j int) bool {
return attributes[i].Name < attributes[j].Name
}