Get int by index from int slice
(i int, args ...int)
| 188 | |
| 189 | // Get int by index from int slice |
| 190 | func (a argInt) Get(i int, args ...int) (r int) { |
| 191 | if i >= 0 && i < len(a) { |
| 192 | r = a[i] |
| 193 | } |
| 194 | if len(args) > 0 { |
| 195 | r = args[0] |
| 196 | } |
| 197 | return |
| 198 | } |
| 199 | |
| 200 | // TimeToUnix transform time to Unix time, the number of seconds elapsed |
| 201 | func TimeToUnix(t time.Time) int64 { |
no outgoing calls
no test coverage detected