code: func (t *PlatformsTable) computeChanges(c context.Context, platforms []*config.Platform) {
  	cfgs := make(map[string]*Platform, len(platforms))
  	for _, cfg := range platforms {
  		cfgs[cfg.Name] = &Platform{
  			Platform: config.Platform{
  				Name:         cfg.Name,
  				Description:  cfg.Description,
  				Manufacturer: cfg.Manufacturer,
  			},
  		}
  	}
  
  	for _, p := range t.current {
  		if cfg, ok := cfgs[p.Name]; ok {
  			// Platform found in the config.
  			if t.needsUpdate(p, cfg) {
  				// Platform doesn't match the config.
  				cfg.Id = p.Id
  				t.updates = append(t.updates, cfg)
  			}
  			// Record that the platform config has been seen.
  			delete(cfgs, cfg.Name)
  		} else {
  			// Platform not found in the config.
  			t.removals = append(t.removals, p)
  		}
  	}
  
  	// Platforms remaining in the map are present in the config but not the database.
  	// Iterate deterministically over the slice to determine which platforms need to be added.
  	for _, cfg := range platforms {
  		if p, ok := cfgs[cfg.Name]; ok {
  			t.additions = append(t.additions, p)
  		}
  	}
  }
docs: // computeChanges computes the changes that need to be made to the platforms in the database.