code: func Build(path string, dns, dnsSearch, dnsOptions []string) (*File, error) {
  	content := bytes.NewBuffer(nil)
  	if len(dnsSearch) > 0 {
  		if searchString := strings.Join(dnsSearch, " "); strings.Trim(searchString, " ") != "." {
  			if _, err := content.WriteString("search " + searchString + "\n"); err != nil {
  				return nil, err
  			}
  		}
  	}
  	for _, dns := range dns {
  		if _, err := content.WriteString("nameserver " + dns + "\n"); err != nil {
  			return nil, err
  		}
  	}
  	if len(dnsOptions) > 0 {
  		if optsString := strings.Join(dnsOptions, " "); strings.Trim(optsString, " ") != "" {
  			if _, err := content.WriteString("options " + optsString + "\n"); err != nil {
  				return nil, err
  			}
  		}
  	}
  
  	hash, err := ioutils.HashData(bytes.NewReader(content.Bytes()))
  	if err != nil {
  		return nil, err
  	}
  
  	return &File{Content: content.Bytes(), Hash: hash}, ioutil.WriteFile(path, content.Bytes(), 0644)
  }
docs: // Build writes a configuration file to path containing a "nameserver" entry
  // for every element in dns, a "search" entry for every element in
  // dnsSearch, and an "options" entry for every element in dnsOptions.