github.com/slantview/etcdctl@v0.1.3-0.20131011185546-5aaeca137f94/flags.go (about) 1 package main 2 3 import ( 4 "strings" 5 ) 6 7 type ClusterValue struct { 8 machines string 9 } 10 11 func (c *ClusterValue) String() string { 12 return c.machines 13 } 14 15 func (c *ClusterValue) Set(value string) error { 16 if len(value) == 0 { 17 return nil 18 } 19 20 c.machines = value 21 22 return nil 23 } 24 25 func (c *ClusterValue) GetMachines() []string { 26 return strings.Split(c.machines, ",") 27 }