code: func (a *Agent) loadTagsFile(tagsFile string) error {
  	// Avoid passing tags and using a tags file at the same time
  	if len(a.agentConf.Tags) > 0 {
  		return fmt.Errorf("Tags config not allowed while using tag files")
  	}
  
  	if _, err := os.Stat(tagsFile); err == nil {
  		tagData, err := ioutil.ReadFile(tagsFile)
  		if err != nil {
  			return fmt.Errorf("Failed to read tags file: %s", err)
  		}
  		if err := json.Unmarshal(tagData, &a.conf.Tags); err != nil {
  			return fmt.Errorf("Failed to decode tags file: %s", err)
  		}
  		a.logger.Printf("[INFO] agent: Restored %d tag(s) from %s",
  			len(a.conf.Tags), tagsFile)
  	}
  
  	// Success!
  	return nil
  }
docs: // loadTagsFile will load agent tags out of a file and set them in the
  // current serf configuration.