Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sockets_unix.go:24:28: undefined: context #60

Closed
romantomchak opened this issue Apr 22, 2019 · 2 comments
Closed

sockets_unix.go:24:28: undefined: context #60

romantomchak opened this issue Apr 22, 2019 · 2 comments

Comments

@romantomchak
Copy link

romantomchak commented Apr 22, 2019

Hi,

After last update an issue appear during my application compilation:

sockets_unix.go:24:28: undefined: context

in sockets_unix.go you are using context.Context but context package is not imported.

usage:

tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
    return dialer.DialContext(ctx, proto, addr)
}

import:

import (
	"fmt"
	"net"
	"net/http"
	"syscall"
	"time"
)
@AkihiroSuda
Copy link
Collaborator

#58

cc @PaulSD

@PaulSD
Copy link
Contributor

PaulSD commented Apr 22, 2019

🤦‍♂️

Working on a fix.

PaulSD added a commit to PaulSD/go-connections that referenced this issue Apr 22, 2019
* Add missing import of "context" (Fixes
  docker#60)
* Drop configuration of the http.Transport.DialContext based on proxy
  settings (This was originally needed for SOCKS support, but has not
  been required since https://go-review.googlesource.com/c/go/+/35488/
  in Go 1.9, and is no longer supported as of
  https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11)
PaulSD added a commit to PaulSD/go-connections that referenced this issue Apr 22, 2019
* Add missing import of "context" (Fixes
  docker#60)
* Drop configuration of the http.Transport.DialContext based on proxy
  settings (This was originally needed for SOCKS support, but has not
  been required since https://go-review.googlesource.com/c/go/+/35488/
  in Go 1.9, and is no longer supported as of
  https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11)
PaulSD added a commit to PaulSD/go-connections that referenced this issue Apr 24, 2019
* Add missing import of "context" (Fixes
  docker#60)
* Drop configuration of the http.Transport.DialContext based on proxy
  settings (This was originally needed for SOCKS support, but has not
  been required since https://go-review.googlesource.com/c/go/+/35488/
  in Go 1.9, and is no longer supported as of
  https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11)
PaulSD added a commit to PaulSD/go-connections that referenced this issue May 22, 2019
* Add missing import of "context" (Fixes
  docker#60)
* Drop configuration of the http.Transport.DialContext based on proxy
  settings (This was originally needed for SOCKS support, but has not
  been required since https://go-review.googlesource.com/c/go/+/35488/
  in Go 1.9, and is no longer supported as of
  https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11)

Signed-off-by: Paul Donohue <git@PaulSD.com>
olljanat pushed a commit to olljanat/go-connections that referenced this issue May 28, 2019
* Add missing import of "context" (Fixes
  docker#60)
* Drop configuration of the http.Transport.DialContext based on proxy
  settings (This was originally needed for SOCKS support, but has not
  been required since https://go-review.googlesource.com/c/go/+/35488/
  in Go 1.9, and is no longer supported as of
  https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11)

Signed-off-by: Paul Donohue <git@PaulSD.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants