(value string)
| 23 | type allowedUsers []int64 |
| 24 | |
| 25 | func (au *allowedUsers) Decode(value string) error { |
| 26 | if value == "" { |
| 27 | return nil |
| 28 | } |
| 29 | ids := strings.Split(string(value), ",") |
| 30 | for _, id := range ids { |
| 31 | idInt, err := strconv.ParseInt(id, 10, 64) |
| 32 | if err != nil { |
| 33 | return err |
| 34 | } |
| 35 | *au = append(*au, idInt) |
| 36 | } |
| 37 | return nil |
| 38 | } |
| 39 | |
| 40 | type config struct { |
| 41 | ApiID int32 `envconfig:"API_ID" required:"true"` |