projects
/
scm
/
test.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 2.5.0
[scm/test.git]
/
vendor
/
github.com
/
git-lfs
/
gitobj
/
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
}