On Fri, May 10, 2024 at 2:11 PM Tobias Klausmann
wrote:
>
> On Fri, 10 May 2024, Ian Lance Taylor wrote:
> > This is a choice made by Go. You can override with the -modcacherw
> > option to "go build", "go test", "go install", and similar code. You
> > can make that option the default by setting
On Friday 10 May 2024 at 17:03:46 UTC+1 Sebastian Bogan wrote:
Would something like the following work (and be less risky)?:
type ConstError string
func (e ConstError) Error() string {
return string(e)
}
const ErrNotExist = ConstError("file does not exist")
If you compare an error v
Hi!
On Fri, 10 May 2024, Ian Lance Taylor wrote:
> This is a choice made by Go. You can override with the -modcacherw
> option to "go build", "go test", "go install", and similar code. You
> can make that option the default by setting GOFLAGS in the environment
> or via "go env GOFLAGS=...".
>
On Fri, May 10, 2024 at 10:43 AM Tobias Klausmann
wrote:
>
> I test and try a whole load of Go tools and libraries, and as a result,
> my ~go/pkg dir quickly grows. While I'd love some kind of automatic
> expiry for that cache, I am fine with just occasionally running rm-rf on
> that dir myself.
>
On Fri, 2024-05-10 at 04:24 -0700, Sebastian Bogan wrote:
> Hello Everyone,
>
> I was wondering, what was / is the reason for exposing errors as
> public vars - rather than constants? Doesn't that impose some risk?
>
> For example:
>
> fs.ErrNotExist = errors.New("foo")
> _, err = os.ReadFil
My team recently started using podman and the UBI9 go-toolset image to
containerize our golang apps [1]. We found that if our Dockerfile copied
the entire source tree in (including the .git directory), `go build` would
fail unless we set the `-buildvcs=false` flag [2].
Since this wasn't happeni
Hi!
I test and try a whole load of Go tools and libraries, and as a result,
my ~go/pkg dir quickly grows. While I'd love some kind of automatic
expiry for that cache, I am fine with just occasionally running rm-rf on
that dir myself.
... except it doesn't work. For some unclear reason, some of th
Hello Everyone,
I was wondering, what was / is the reason for exposing errors as public
vars - rather than constants? Doesn't that impose some risk?
For example:
fs.ErrNotExist = errors.New("foo")
_, err = os.ReadFile("./invalid")
if !errors.Is(err, fs.ErrNotExist) {
fmt.Println("is N