code: func checkDuplicateCommands(dp models.DeviceProfile, w http.ResponseWriter) error {
  	// Check if there are duplicate names in the device profile command list
  	for _, c1 := range dp.CoreCommands {
  		count := 0
  		for _, c2 := range dp.CoreCommands {
  			if c1.Name == c2.Name {
  				count += 1
  			}
  		}
  		if count > 1 {
  			err := errors.New("Error adding device profile: Duplicate names in the commands")
  			http.Error(w, err.Error(), http.StatusConflict)
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Check for duplicate command names in the device profile