code: func (s *HTTPServer) configGet(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
  	var args structs.ConfigEntryQuery
  	if done := s.parse(resp, req, &args.Datacenter, &args.QueryOptions); done {
  		return nil, nil
  	}
  	pathArgs := strings.SplitN(strings.TrimPrefix(req.URL.Path, "/v1/config/"), "/", 2)
  
  	switch len(pathArgs) {
  	case 2:
  		// Both kind/name provided.
  		args.Kind = pathArgs[0]
  		args.Name = pathArgs[1]
  
  		var reply structs.ConfigEntryResponse
  		if err := s.agent.RPC("ConfigEntry.Get", &args, &reply); err != nil {
  			return nil, err
  		}
  
  		if reply.Entry == nil {
  			return nil, NotFoundError{Reason: fmt.Sprintf("Config entry not found for %q / %q", pathArgs[0], pathArgs[1])}
  		}
  
  		return reply.Entry, nil
  	case 1:
  		// Only kind provided, list entries.
  		args.Kind = pathArgs[0]
  
  		var reply structs.IndexedConfigEntries
  		if err := s.agent.RPC("ConfigEntry.List", &args, &reply); err != nil {
  			return nil, err
  		}
  
  		return reply.Entries, nil
  	default:
  		return nil, NotFoundError{Reason: "Must provide either a kind or both kind and name"}
  	}
  }
docs: // configGet gets either a specific config entry, or lists all config entries
  // of a kind if no name is provided.