MCPcopy
hub / github.com/bettercap/bettercap / StringParam

Method StringParam

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

Source from the content-addressed store, hash-verified

149}
150
151func (m SessionModule) StringParam(name string) (error, string) {
152 if p, found := m.params[name]; found {
153 if err, v := p.Get(m.Session); err != nil {
154 return err, ""
155 } else {
156 return nil, v.(string)
157 }
158 } else {
159 return fmt.Errorf("Parameter %s does not exist.", name), ""
160 }
161}
162
163func (m SessionModule) IPParam(name string) (error, net.IP) {
164 if err, v := m.StringParam(name); err != nil {

Callers 15

ListParamMethod · 0.95
IPParamMethod · 0.95
TestNewTickerFunction · 0.80
ConfigureMethod · 0.80
TestViewSelectorForFunction · 0.80
parseFilterMethod · 0.80
parseSortingMethod · 0.80
ConfigureMethod · 0.80
RenderMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80

Calls 1

GetMethod · 0.45

Tested by 3

TestNewTickerFunction · 0.64
TestViewSelectorForFunction · 0.64
TestWiFiModuleBruteforceFunction · 0.64