MCPcopy Index your code
hub / github.com/bettercap/bettercap / ListParam

Method ListParam

session/module.go:134–149  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

132}
133
134func (m SessionModule) ListParam(name string) (err error, values []string) {
135 values = make([]string, 0)
136 list := ""
137 if err, list = m.StringParam(name); err != nil {
138 return
139 } else {
140 parts := strings.Split(list, ",")
141 for _, part := range parts {
142 part = str.Trim(part)
143 if part != "" {
144 values = append(values, part)
145 }
146 }
147 }
148 return
149}
150
151func (m SessionModule) StringParam(name string) (error, string) {
152 if p, found := m.params[name]; found {

Callers 2

ConfigureMethod · 0.80
ConfigureMethod · 0.80

Calls 1

StringParamMethod · 0.95

Tested by

no test coverage detected