go-isatty icon indicating copy to clipboard operation
go-isatty copied to clipboard

old /x/sys package produces error while compiling

Open shif3r opened this issue 5 years ago • 5 comments

Description

I was trying to use docker cli by fsouza in my project but it produces an error when i compile it. https://github.com/golang/go/issues/34610

How to reproduce

package main

import "github.com/fsouza/go-dockerclient"

func main() {
	if _, err := docker.NewClientFromEnv(); err != nil {
		panic(err)
	}
}
module exex.org/helpme

go 1.14

require (
	github.com/fsouza/go-dockerclient v1.6.4
	github.com/mattn/go-isatty v0.0.12 // indirect
)

Expectations

normal compile

Actual result

..\..\go\pkg\mod\github.com\docker\[email protected]\pkg\system\filesys_windows.go:112:24: cannot use uintptr(unsafe.Pointer(&sd[0])) (ty
pe uintptr) as type *"golang.org/x/sys/windows".SECURITY_DESCRIPTOR in assignment

Environment

  • go version: 1.14.2
  • operating system: Windows 10

shif3r avatar Apr 21 '20 14:04 shif3r

As far as I can see, it's not depend on go-isatty. It's possible to reproduce without go-isatty.

mattn avatar Apr 21 '20 15:04 mattn

As far as I can see, it's not depend on go-isatty. It's possible to reproduce without go-isatty.

mattn avatar Apr 21 '20 15:04 mattn

As far as I can see, it's not depend on go-isatty. It's possible to reproduce without go-isatty.

mattn avatar Apr 21 '20 15:04 mattn

The problem is, what my service is using a gin package which has depends on isatty. I tried to automate creating docker containers and get this error. Anyway, i think it's a problem, what your library isn't using latest /x/sys package

shif3r avatar Apr 21 '20 15:04 shif3r