1
0
mirror of https://github.com/golang/go synced 2024-11-24 09:50:17 -07:00

exp/template: index: forgot the always last-to-arrive uintptr.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4636087
This commit is contained in:
Rob Pike 2011-07-07 07:00:48 +10:00
parent 1aa571d38b
commit 46ecd6f141

View File

@ -89,7 +89,7 @@ func index(item interface{}, indices ...interface{}) (interface{}, os.Error) {
switch index.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
x = index.Int()
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
x = int64(index.Uint())
default:
return nil, fmt.Errorf("cannot index slice/array with type %s", index.Type())