github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/cf/models/environment_variable.go (about) 1 package models 2 3 import "strings" 4 5 type EnvironmentVariable struct { 6 Name string 7 Value string 8 } 9 10 type EnvironmentVariableList []EnvironmentVariable 11 12 func (evl EnvironmentVariableList) Len() int { 13 return len(evl) 14 } 15 16 func (evl EnvironmentVariableList) Swap(i, j int) { 17 evl[i], evl[j] = evl[j], evl[i] 18 } 19 20 func (evl EnvironmentVariableList) Less(i, j int) bool { 21 return strings.Compare(strings.ToLower(evl[i].Name), strings.ToLower(evl[j].Name)) == -1 22 }