Re: [go-nuts] Idea for a language addition for error handling: inject/eject

2022-11-11 Thread Mike Schinkel
Hi G., It takes guts to make a proposal in the Go community. Kudos for doing so. However, the issue with this proposal for me is the issue I have with almost(?) every other proposal to handle errors in Go differently from what Go currently allows. They all make the assumption that as soon as a

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Sandeep Kalra
Thanks, sorted out. this works! //go:build debug || linux_debug || darwin_debug || darwin // +build debug linux_debug darwin_debug darwin On Friday, November 11, 2022 at 3:50:23 PM UTC-6 harr...@spu.edu wrote: > I think the result of the proposal explains some rewriting in .go files, > at lea

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Andrew Harris
I think the result of the proposal explains some rewriting in .go files, at least. I believe the conventional wisdom/best practices here are: - Use separate, parallel files to hold platform- (or tag-) specific code, e.g: init_darwin.go, init_linux.go, init_windows.go - Prefer setting envir

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Sandeep Kalra
probably yes - the implementation of tools for this feature. If you see the accepted proposal there is this example: https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md // +build 386 windows,amd64 windows BTW, I am on go1.19.3. On Friday, November 11, 2022 at 3:18:44 PM UTC-6

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Sandeep Kalra
Hi, I will try to explain: so, I have to run my code at 3 places : linux, windows and darwin. and On each platform there is a production and debug code. To make this happen, i am using build tags. for e.g. to make build for linux in production, the script will use this: go build --tags "linux, pr

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Andrew Harris
Is this relevant? https://github.com/golang/go/issues/41184 On Friday, November 11, 2022 at 1:16:02 PM UTC-8 se...@liao.dev wrote: > You'll need to provide more info if you want to report a bug: > > ``` > main » cat main.go > // +build production > // +build linux > > package main > > 21

Re: [go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread 'Sean Liao' via golang-nuts
You'll need to provide more info if you want to report a bug: ``` main » cat main.go // +build production // +build linux package main 21:13:35 ~/tmp/testrepo0017 0:00:00 main » go fmt . main.go 21:13:39 ~/tmp/testrepo0017 0:00:00 main » cat main.go //go:build production && linux // +build prod

[go-nuts] Re: is this a bug in "go fmt"?

2022-11-11 Thread Sandeep Kalra
and similar issue with other style of adding tags as well i.e. // +build tag1,tag2 // +build tag1 tag2 etc On Friday, November 11, 2022 at 3:07:40 PM UTC-6 Sandeep Kalra wrote: > Original code: > > $ cat production.go > > //go:build production > // +build production > // +build linux << No

[go-nuts] is this a bug in "go fmt"?

2022-11-11 Thread Sandeep Kalra
Original code: $ cat production.go //go:build production // +build production // +build linux << Notice This Line as my production code is only available on Linux package main const ( isProductionCode = true isDebugCode = false ) $ go fmt production.go production.go $ cat pr

[go-nuts] go get with Azure Devops on premise?

2022-11-11 Thread Johann Höchtl
Hi, we are using Azure Devops server Version Azure DevOps Server 2020 Update 1.1 on premise. The server is not accessible from the internet. The web server uses integrated authentication for access. Browsing a git repository from a web browser looks like this: https://servername.yada.yada/tfs/Co

[go-nuts] BUGFIX-66: Algorithmic Puzzles in Go

2022-11-11 Thread BUGFIX 66
Still under construction: https://BUGFIX-66.com Site is intended to be like the book Hacker's Delight, but as a game. Or like professional programming, where you're mostly trying to understand/modify other people's code. Or like programming in a post-GPT3 world where you're checking/fixing a t

[go-nuts] NSA recommends using memory safe languages like Go

2022-11-11 Thread peterGo
FYI The US National Security Agency (NSA) published guidance today to help software developers and operators prevent and mitigate software memory safety issues, which account for a large portion of exploitable vulnerabilities. https://www.nsa.gov/Press-Room/News-Highlights/Article/Article/3215