(name string)
| 169 | } |
| 170 | |
| 171 | func (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 | |
| 184 | func (m SessionModule) DecParam(name string) (error, float64) { |
| 185 | if p, found := m.params[name]; found { |