MCPcopy
hub / github.com/bettercap/bettercap / IntParam

Method IntParam

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

Source from the content-addressed store, hash-verified

169}
170
171func (m SessionModule) IntParam(name string) (error, int) {
172 if p, found := m.params[name]; found {
173 if err, v := p.Get(m.Session); err != nil {
174 return err, 0
175 } else {
176 return nil, v.(int)
177 }
178
179 } else {
180 return fmt.Errorf("Parameter %s does not exist.", name), 0
181 }
182}
183
184func (m SessionModule) DecParam(name string) (error, float64) {
185 if p, found := m.params[name]; found {

Callers 15

TestNewTickerFunction · 0.80
ConfigureMethod · 0.80
TestViewSelectorForFunction · 0.80
UpdateMethod · 0.80
ConfigureMethod · 0.80
startRecordingMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80
ConfigureMethod · 0.80

Calls 1

GetMethod · 0.45

Tested by 2

TestNewTickerFunction · 0.64
TestViewSelectorForFunction · 0.64