portainer/portainer

View on GitHub
api/backup/restore.go

Summary

Maintainability
A
1 hr
Test Coverage

Function RestoreArchive has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func RestoreArchive(archive io.Reader, password string, filestorePath string, gate *offlinegate.OfflineGate, datastore dataservices.DataStore, shutdownTrigger context.CancelFunc) error {
Severity: Minor
Found in api/backup/restore.go - About 45 mins to fix

    Function RestoreArchive has 6 return statements (exceeds 4 allowed).
    Open

    func RestoreArchive(archive io.Reader, password string, filestorePath string, gate *offlinegate.OfflineGate, datastore dataservices.DataStore, shutdownTrigger context.CancelFunc) error {
        var err error
        if password != "" {
            archive, err = decrypt(archive, password)
            if err != nil {
    Severity: Major
    Found in api/backup/restore.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status