code: func handleDockerCfgJSONContent(username, password, email, server string) ([]byte, error) {
  	dockercfgAuth := DockerConfigEntry{
  		Username: username,
  		Password: password,
  		Email:    email,
  		Auth:     encodeDockerConfigFieldAuth(username, password),
  	}
  
  	dockerCfgJSON := DockerConfigJSON{
  		Auths: map[string]DockerConfigEntry{server: dockercfgAuth},
  	}
  
  	return json.Marshal(dockerCfgJSON)
  }
docs: // handleDockerCfgJSONContent serializes a ~/.docker/config.json file