OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / stretchr / testify / vendor / github.com / stretchr / objx / codegen / array-access.txt
1   case []{1}:
2     a := object.([]{1})
3     if isSet {
4       a[index] = value.({1})
5     } else {
6       if index >= len(a) {
7         if panics {
8           panic(fmt.Sprintf("objx: Index %d is out of range because the []{1} only contains %d items.", index, len(a)))
9         }
10         return nil
11       } else {
12         return a[index]
13       }
14     }