okteto / okteto

Empty slice literal used to declare a variable GO-W1027
Anti-pattern
Minor
4 occurrences in this check
Empty slice literal of type "[]ItemEvent" used to define "events"
 778
 779// GetInSynchronizationFile the files syncthing
 780func (s *Syncthing) GetInSynchronizationFile(ctx context.Context) string {
 781	events := []ItemEvent{} 782	params := map[string]string{
 783		"device":  DefaultRemoteDeviceID,
 784		"since":   "0",
Empty slice literal of type "[]FolderErrorEvent" used to define "folderErrorsList"
 708		"timeout": "0",
 709		"events":  "FolderErrors",
 710	}
 711	folderErrorsList := []FolderErrorEvent{} 712	body, err := s.APICall(ctx, "rest/events", "GET", http.StatusOK, params, local, nil, true, maxRetries)
 713	if err != nil {
 714		oktetoLog.Infof("error getting events: %s", err.Error())
Empty slice literal of type "[]FolderSummaryEvent" used to define "fsList"
 647		"timeout": "0",
 648		"events":  "FolderSummary",
 649	}
 650	fsList := []FolderSummaryEvent{} 651	body, err := s.APICall(ctx, "rest/events", "GET", http.StatusOK, params, local, nil, true, maxRetries)
 652	if err != nil {
 653		oktetoLog.Infof("error getting events: %s", err.Error())
Empty slice literal of type "[]StateChangedEvent" used to define "scList"
 585		"timeout": "0",
 586		"events":  "StateChanged",
 587	}
 588	scList := []StateChangedEvent{} 589	body, err := s.APICall(ctx, "rest/events", "GET", http.StatusOK, params, local, nil, true, maxRetries)
 590	if err != nil {
 591		oktetoLog.Infof("error getting events: %s", err.Error())