Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-separated list, so we split it.
(value string)
| 218 | // Set's argument is a string to be parsed to set the param. |
| 219 | // It's a comma-separated list, so we split it. |
| 220 | func (s *SInt64) Set(value string) error { |
| 221 | for _, dt := range strings.Split(value, ",") { |
| 222 | if len(dt) > 0 { |
| 223 | parsed, err := strconv.ParseInt(dt, 0, 64) |
| 224 | if err != nil { |
| 225 | return err |
| 226 | } |
| 227 | *s = append(*s, int64(parsed)) |
| 228 | } |
| 229 | } |
| 230 | return nil |
| 231 | } |
| 232 | |
| 233 | // SliceInt64 defines a multi-value int64 param with specified name and default value. |
| 234 | // The return value is the address of a SInt64 variable that stores the values of the param. |
nothing calls this directly
no outgoing calls
no test coverage detected