const PathSeparator … const arrayAccessRegexString … const mapAccessRegexString … var arrayAccessRegex … var mapAccessRegex … // Get gets the value using the specified selector and // returns it inside a new Obj object. // // If it cannot find the value, Get will return a nil // value inside an instance of Obj. // // Get can only operate directly on map[string]interface{} and []interface. // // # Example // // To access the title of the third chapter of the second book, do: // // o.Get("books[1].chapters[2].title") func (m Map) Get(selector string) *Value { … } // Set sets the value using the specified selector and // returns the object on which Set was called. // // Set can only operate directly on map[string]interface{} and []interface // // # Example // // To set the title of the third chapter of the second book, do: // // o.Set("books[1].chapters[2].title","Time to Go") func (m Map) Set(selector string, value interface{ … } // getIndex returns the index, which is hold in s by two branches. // It also returns s without the index part, e.g. name[1] will return (1, name). // If no index is found, -1 is returned func getIndex(s string) (int, string) { … } // getKey returns the key which is held in s by two brackets. // It also returns the next selector. func getKey(s string) (string, string) { … } // access accesses the object using the selector and performs the // appropriate action. func access(current interface{ … } func interSlice(slice interface{ … }