Skip to content

Commit

Permalink
Fix godoc about map key and array/slice index
Browse files Browse the repository at this point in the history
  • Loading branch information
tenntenn committed Jun 4, 2017
1 parent 7f0aaca commit 691e8c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 691e8c2

Please sign in to comment.