code: func (c *gitCredentials) WriteTo(w io.Writer) (int64, error) {
  	var n int64
  	if c.Protocol != "" {
  		i, err := io.WriteString(w, "protocol="+c.Protocol+"\n")
  		n += int64(i)
  		if err != nil {
  			return n, err
  		}
  	}
  	if c.Host != "" {
  		i, err := io.WriteString(w, "host="+c.Host+"\n")
  		n += int64(i)
  		if err != nil {
  			return n, err
  		}
  	}
  	if c.Path != "" {
  		i, err := io.WriteString(w, "path="+c.Path+"\n")
  		n += int64(i)
  		if err != nil {
  			return n, err
  		}
  	}
  	if c.Username != "" {
  		i, err := io.WriteString(w, "username="+c.Username+"\n")
  		n += int64(i)
  		if err != nil {
  			return n, err
  		}
  	}
  	if c.Password != "" {
  		i, err := io.WriteString(w, "password="+c.Password+"\n")
  		n += int64(i)
  		if err != nil {
  			return n, err
  		}
  	}
  	return n, nil
  }
docs: // WriteTo writes the given credentials to the given io.Writer in the git-credential format