code: func validatePlatforms(c *validation.Context, cfg *configPB.Platforms) {
  	// Platform names must be unique.
  	// Keep records of ones we've already seen.
  	names := stringset.New(len(cfg.Platform))
  	for _, p := range cfg.Platform {
  		switch {
  		case p.Name == "":
  			c.Errorf("platform names are required and must be non-empty")
  		case !names.Add(p.Name):
  			c.Errorf("duplicate platform %q", p.Name)
  		}
  	}
  }
docs: // validatePlatforms validates platforms.cfg.