Skip to content

Commit

Permalink
Update go-version to use go.mod file
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardinius committed Apr 3, 2024
1 parent a527dfa commit 2cd6ed6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version-file: 'go.mod'
- name: Build & test
run: make ci-test
- name: Upload log files
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version-file: 'go.mod'
- name: Build & test
run: make ci-test
- name: Upload log files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version-file: 'go.mod'
- name: Build release
run: |
make clean lint test;
Expand Down
4 changes: 2 additions & 2 deletions app/server/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
ErrAuthAnonCredentials = errors.New("user has not authenticated. anonymous access is not allowed")

// ErrUnsupportedMechanism error for unsupported mechanism.
ErrorUnsupportedMechanism = errors.New("unsupported authentication mechanism")
ErrUnsupportedMechanism = errors.New("unsupported authentication mechanism")
)

// The backend implements SMTP server methods.
Expand Down Expand Up @@ -127,7 +127,7 @@ func (s *session) Auth(mech string) (sasl.Server, error) {
return err
}), nil
default:
return nil, ErrorUnsupportedMechanism
return nil, ErrUnsupportedMechanism
}
}

Expand Down
8 changes: 6 additions & 2 deletions tests/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ func dynamicPort() int {
panic(err)
}
}()
port := listener.Addr().(*net.TCPAddr).Port
return port

if port, ok := listener.Addr().(*net.TCPAddr); ok {
return port.Port
}

panic("Failed to get port")
}

// TerminateContainer terminates container if present.
Expand Down

0 comments on commit 2cd6ed6

Please sign in to comment.