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