[go-nuts] x/lint (golint) is now deprecated and frozen

2021-05-14 Thread 'Daniel Martí' via golang-nuts
Hi all,

As per https://golang.org/issue/38968, approved nearly a year ago,
x/lint is now deprecated and its repository has been frozen.

There's no drop-in replacement to golint per se, but you should find
that https://staticcheck.io/ works well in encouraging good Go code,
much like golint did in the past, since it also includes style checks.
There's always "gofmt" and "go vet" too, of course.

If you're currently enforcing golint via CI, hooks, or checks, it's
recommended that you stop doing that. golint was never intended as a
tool with zero false positives, and it hasn't been actively maintained
for some time.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20210514083101.ulgafmvot4gqycvt%40carbon.localhost.


Re: [go-nuts] Any solution to hide my source code written in Go and make it a library to develop in Go as well

2020-05-16 Thread Daniel Martí
I don't generally advocate the use of obfuscation, but you can give this a 
try if you want: https://github.com/mvdan/garble

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/031bc223-7a73-4b60-85bf-105d21f8c206%40googlegroups.com.


Re: [go-nuts] Go list returning directory starting with underscore on Ubuntu

2018-10-11 Thread Daniel Martí
I've encountered similar behavior with testdata directories within GOPATH,
when not in module-aware mode.

I found this thread while searching for answers, so I'm linking the issue I 
just
created in case anyone else runs into the same bug:
https://github.com/golang/go/issues/28155

On Wednesday, April 25, 2018 at 4:21:43 PM UTC+1, run...@uber.com wrote:
>
> Not accurate. 
>
> $ cat ~/code/scratch/repro-underscore-issue.sh
> echo "GOPATH: $GOPATH"
> mkdir -p $GOPATH/src/github.com/testcase/testdata
> echo "package testdata" > $GOPATH/src/
> github.com/testcase/testdata/testdata.go
> echo "" >> $GOPATH/src/github.com/testcase/testdata/testdata.go
> cd $GOPATH/src/github.com/testcase/testdata
> echo "Running go list ./..."
> go list ./...
>
> $ ~/code/scratch/repro-underscore-issue.sh
> GOPATH: /Users/prungta/code/gocode
> Running go list ./...
> _/Users/prungta/code/gocode/src/github.com/testcase/testdata
>
>
> Should this be a bug report? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] New meetup in Sheffield

2018-08-16 Thread Daniel Martí
Hi all,

I have just started a Go meetup in Sheffield, 
England: https://www.meetup.com/GoSheffield/

Feel free to sign up if you live nearby or would visit from time to time - 
regular meetups will begin next month :)

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Switching from rsc.io/letsencrypt to x/crypto/acme/autocert

2017-07-05 Thread Daniel Martí
Hi all,

One project I contribute to started using rsc.io/letsencrypt years ago.
Now that it's recommended to switch to the latter, I've been looking
into getting it done.

But I'm confused as to what happened to Manager.Marshal and
Manager.Unmarshal. We use these to store the state somewhere and get it
back at a later time.

Were these removed on purpose from acme/autocert? What's the recommended
alternative?

I've seen Manager.Cache but it seems different. Instead of getting or
setting the state at will, you instead supply the storage
implementation. Is this what we should be using?

Thanks!

-- 
Daniel Martí - https://mvdan.cc/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: [golang-dev] Re: Go 1.8.3 is released

2017-05-25 Thread Daniel Martí
Peter, I believe the 1.8 release branch was force-pushed to for 1.8.2,
so I don't think you'll be able to git pull and get to 1.8.3.

Try a checkout instead, like git checkout go1.8.3.

On Thu, May 25, 2017 at 06:24:04 -0700, peterGo wrote:
> VERSION:
> 
> <<<<<<< HEAD
> go1.8.1
> ===
> go1.8.3
> >>>>>>> 352996a381701cfa0c16e8de29cbde8f3922182f
> 
> Peter

-- 
Daniel Martí - mv...@mvdan.cc - https://mvdan.cc/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Tool to detect unused parameters

2017-03-05 Thread Daniel Martí
Hey all,

As a weekend project I've written a linter that detects unused
parameters: https://github.com/mvdan/unparam

As many of you may know, this is tricky business because of interfaces
and build tags, among other things. So the tool isn't free from false
positives, and I don't think it could be. But it does an okay job.

Please try it out and share your thoughts. I've already sent a bunch of
CLs to Go itself:

https://go-review.googlesource.com/q/owner:mvdan%2540mvdan.cc+project:go+status:open

-- 
Daniel Martí - mv...@mvdan.cc - https://mvdan.cc/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Typed encoding

2017-01-05 Thread Daniel Martí
Hello all,

I wrote a package that parses a language (bash) and constructs an AST. I
would like to make it easier for other tools to use it, even outside of
Go.

I'm aware that Go can be built as a shared library, but I'd like to go a
simpler route especially for scripting languages.

What encoding would suit best? I initially thought something like
encoding/json, which would work fairly well to give data. But it starts
to break with interfaces. For example:

https://godoc.org/github.com/mvdan/sh/syntax#Stmt

Once in json, the type information is lost and needs to be inferred.
This could still be okay.

But the problem is unmarshalling back, e.g. if the script modifies the
AST and Go wishes to read it back to, for example, write the modified
version into a formatted .sh file.

I'm expecting this to not work at all, since the best it could do is
map[string]interface{}.

What encoding/format should I use? I'm aware of "typed" wire encodings
like grpc's, but that's probably too overkill for this.

I was thinking of switching back and forth between the true types and
map[string]interface{} manually via reflect, adding "Type" fields to
each interface value. But as you can imagine, that's a lot of
boilerplate. And I'm fairly sure there has to be something for this.

-- 
Daniel Martí - mv...@mvdan.cc - https://mvdan.cc/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] [ANN] sh 1.0 released, a shell parser and formatter

2016-12-20 Thread Daniel Martí
Hey all,

I've been working on a shell language package for the past year. It
supports both POSIX and Bash and includes a complete parser and printer.

The API resembles go/*, so it can be used for similar purposes:

https://godoc.org/github.com/mvdan/sh/syntax

The first tool built around this is shfmt - as you can guess, it works
very much like gofmt but on shell scripts:

go get -u github.com/mvdan/sh/cmd/shfmt

Any feedback, contributions or questions are welcome. This was a side
project to teach myself a few things, so that's your answer to "why
would anyone build this?".

-- 
Daniel Martí - mv...@mvdan.cc - https://mvdan.cc/

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.