Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint_golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
id: go
with:
go-version-file: go.mod
Expand All @@ -34,5 +34,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: v2.10.1
version: v2.11.4
args: --verbose
2 changes: 1 addition & 1 deletion .github/workflows/regen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
id: go
with:
go-version-file: go.mod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
- run: go mod download
Expand Down
6 changes: 2 additions & 4 deletions managedplugin/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ func (pr *dockerProgressReader) Read(_ []byte) (n int, err error) {
}

func newDockerClient(options ...client.Opt) (*client.Client, error) {
defaultOptions := []client.Opt{
client.FromEnv,
client.WithAPIVersionNegotiation(),
}
defaultOptions := make([]client.Opt, 0, 2+len(options))
defaultOptions = append(defaultOptions, client.FromEnv, client.WithAPIVersionNegotiation())
options = append(defaultOptions, options...)
return client.NewClientWithOpts(options...)
Comment thread
erezrokah marked this conversation as resolved.
}
Expand Down
2 changes: 1 addition & 1 deletion managedplugin/log_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (r *LogReader) NextLine() ([]byte, error) {
if !isPrefix || err != nil {
return line, err
}
prefix := make([]byte, logReaderPrefixLen)
prefix := make([]byte, logReaderPrefixLen, logReaderPrefixLen+len(ellipsis))
Comment thread
erezrokah marked this conversation as resolved.
for i := 0; isPrefix; i++ {
// this loop is entered if a log line is too long to fit into the buffer. We discard it by
// iterating until isPrefix becomes false. We only log the first few bytes of the line to help with
Expand Down
Loading