gliderlabs / logspout

Log routing for Docker container logs
MIT License
4.66k stars 680 forks source link

upgrade dependency #501

Closed skyzh closed 3 years ago

skyzh commented 3 years ago

fix https://github.com/gliderlabs/logspout/issues/449

michaelshobbs commented 3 years ago

looks like the bump in version requires use of a new API

router/pump.go:160:20: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
    container, err := p.client.InspectContainer(event.ID)
                      ^
router/pump.go:206:20: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
    container, err := p.client.InspectContainer(id)
                      ^
router/pump.go:273:22: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
            container, err := p.client.InspectContainer(id)
skyzh commented 3 years ago

looks like the bump in version requires use of a new API

router/pump.go:160:20: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
  container, err := p.client.InspectContainer(event.ID)
                    ^
router/pump.go:206:20: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
  container, err := p.client.InspectContainer(id)
                    ^
router/pump.go:273:22: SA1019: p.client.InspectContainer is deprecated: Use InspectContainerWithOptions instead.  (staticcheck)
          container, err := p.client.InspectContainer(id)

In fact I have successfully built and deployed logspout to our server with the Rate unmarshal issue solved. I'll look into this.

michaelshobbs commented 3 years ago

this was caught by golangci-lint. the CI process requires this to pass regardless of the code compiling

skyzh commented 3 years ago

Thanks for reminding me. I'll fix this soon.

On Tue, Feb 9, 2021 at 12:00 AM Michael Hobbs notifications@github.com wrote:

this was caught by golangci-lint. the CI process requires this to pass regardless of the code compiling

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gliderlabs/logspout/pull/501#issuecomment-775250542, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAA7JYNXRKBZDAGV4MUZJLS6ADBTANCNFSM4XJHIZBA .

skyzh commented 3 years ago

The deprecated API has been removed, according to its implementation here https://github.com/fsouza/go-dockerclient/blob/v1.7.0/container_inspect.go#L14