code: func newServiceConfig(options ServiceOptions) (*serviceConfig, error) {
  	config := &serviceConfig{
  		ServiceConfig: registrytypes.ServiceConfig{
  			InsecureRegistryCIDRs: make([]*registrytypes.NetIPNet, 0),
  			IndexConfigs:          make(map[string]*registrytypes.IndexInfo),
  			// Hack: Bypass setting the mirrors to IndexConfigs since they are going away
  			// and Mirrors are only for the official registry anyways.
  		},
  	}
  	if err := config.LoadAllowNondistributableArtifacts(options.AllowNondistributableArtifacts); err != nil {
  		return nil, err
  	}
  	if err := config.LoadMirrors(options.Mirrors); err != nil {
  		return nil, err
  	}
  	if err := config.LoadInsecureRegistries(options.InsecureRegistries); err != nil {
  		return nil, err
  	}
  
  	return config, nil
  }
docs: // newServiceConfig returns a new instance of ServiceConfig