func NewConfig() *Config {
	return &Config{
		Preferences: *NewPreferences(),
		Clusters:    make(map[string]*Cluster),
		AuthInfos:   make(map[string]*AuthInfo),
		Contexts:    make(map[string]*Context),
		Extensions:  make(map[string]runtime.Object),
	}
}
NewConfig is a convenience function that returns a new Config object with non-nil maps
package api
import (
	"k8s.io/apimachinery/pkg/runtime"
)
type Config struct {
	Kind string `json:"kind,omitempty"`
	APIVersion string `json:"apiVersion,omitempty"`
	Preferences Preferences `json:"preferences"`
	Clusters map[string]*Cluster `json:"clusters"`
	AuthInfos map[string]*AuthInfo `json:"users"`
	Contexts map[string]*Context `json:"contexts"`
	CurrentContext string `json:"current-context"`
	Extensions map[string]runtime.Object `json:"extensions,omitempty"`
}
type Preferences struct {
	Colors bool `json:"colors,omitempty"`
	Extensions map[string]runtime.Object `json:"extensions,omitempty"`
}
type Cluster struct {
	LocationOfOrigin string
	Server string `json:"server"`
	InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
	CertificateAuthority string `json:"certificate-authority,omitempty"`
	CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
	Extensions map[string]runtime.Object `json:"extensions,omitempty"`
}
type AuthInfo struct {
	LocationOfOrigin string
	ClientCertificate string `json:"client-certificate,omitempty"`
	ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
	ClientKey string `json:"client-key,omitempty"`
	ClientKeyData []byte `json:"client-key-data,omitempty"`
	Token string `json:"token,omitempty"`
	TokenFile string `json:"tokenFile,omitempty"`
	Impersonate string `json:"act-as,omitempty"`
	ImpersonateGroups []string `json:"act-as-groups,omitempty"`
	ImpersonateUserExtra map[string][]string `json:"act-as-user-extra,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
	Exec *ExecConfig `json:"exec,omitempty"`
	Extensions map[string]runtime.Object `json:"extensions,omitempty"`
}
type Context struct {
	LocationOfOrigin string
	Cluster string `json:"cluster"`
	AuthInfo string `json:"user"`
	Namespace string `json:"namespace,omitempty"`
	Extensions map[string]runtime.Object `json:"extensions,omitempty"`
}
type AuthProviderConfig struct {
	Name string `json:"name"`
	Config map[string]string `json:"config,omitempty"`
}
type ExecConfig struct {
	Command string `json:"command"`
	Args []string `json:"args"`
	Env []ExecEnvVar `json:"env"`
	APIVersion string `json:"apiVersion,omitempty"`
}
type ExecEnvVar struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}