MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / Set

Method Set

main.go:79–98  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

77}
78
79func (a *CSVArg) Set(line string) error {
80 if line == "" {
81 a.values = nil
82 return nil
83 }
84 rd := csv.NewReader(strings.NewReader(line))
85 rd.FieldsPerRecord = -1
86 rd.TrimLeadingSpace = true
87 rd.ReuseRecord = true
88 values, err := rd.Read()
89 if err == io.EOF {
90 a.values = nil
91 return nil
92 }
93 if err != nil {
94 return fmt.Errorf("unable to parse comma-separated argument: %w", err)
95 }
96 a.values = values
97 return nil
98}
99
100type PrefixList []netip.Prefix
101

Callers 12

parse_argsFunction · 0.45
readConfigFunction · 0.45
requireBasicAuthFunction · 0.45
sendAuthTriggeredMsgFunction · 0.45
ValidateMethod · 0.45
H2ProxyDialerFromURLFunction · 0.45
DialContextMethod · 0.45
LookupNetIPMethod · 0.45
PutMethod · 0.45
GetMethod · 0.45
PutMethod · 0.45
HandleGetRandomMethod · 0.45

Calls 2

ErrorfMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected