code: func (self *UriTemplate) Expand(value interface{}) (string, error) {
  	values, ismap := value.(map[string]interface{})
  	if !ismap {
  		if m, ismap := struct2map(value); !ismap {
  			return "", errors.New("expected map[string]interface{}, struct, or pointer to struct.")
  		} else {
  			return self.Expand(m)
  		}
  	}
  	var buf bytes.Buffer
  	for _, p := range self.parts {
  		err := p.expand(&buf, values)
  		if err != nil {
  			return "", err
  		}
  	}
  	return buf.String(), nil
  }
docs: // Expand expands a URI template with a set of values to produce a string.