MCPcopy
hub / github.com/EverythingSuckz/TG-FileStreamBot / Decode

Method Decode

config/config.go:25–38  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

23type allowedUsers []int64
24
25func (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
40type config struct {
41 ApiID int32 `envconfig:"API_ID" required:"true"`

Callers 1

GetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected