Skip to content
Permalink
Browse files

Fix godoc about map key and array/slice index

  • Loading branch information...
tenntenn committed Jun 4, 2017
1 parent 7f0aaca commit 691e8c2f6430b1af4ff13b9c4a6530917c221201
Showing with 2 additions and 1 deletion.
  1. +2 −1 gpath.go
@@ -12,7 +12,8 @@ import (
// v must be struct or pointer of struct.
// A path is represented by Go's expression which can be parsed by go/parser.ParseExpr.
// You can use selectors and indexes in a path.
// Indexes allow only string and int literals for maps.
// Slice and arrays index allow only expressions of int.
// Maps key allow only expressions of string, int and float64.
func At(v interface{}, path string) (interface{}, error) {

path = "v." + path

0 comments on commit 691e8c2

Please sign in to comment.
You can’t perform that action at this time.