News for hackers. Stuff that matters.
Re:gofumpt: It's like gofmt except more strict by metadat on Friday February 10, 2023 @08:19PM (#34748480)
See also:

interfacer - Automatically Suggest Interface Types in Go

https://github.com/mvdan/interfacer

https://news.ycombinator.com/item?id=11397905 (9 comments)

shmfmt - A shell parser, formatter, and interpreter with BASH support

https://github.com/mvdan/sh

(Submitted often but not yet discussed)

</eom>

/me whispers: Hint: You could be that guy[1] (or gal, they, it, etc):

/submit shmfmt

Feel free to leave a link to your submission here for interested parties to encounter.

[1] https://youtube.com/watch?v=HQXTxG8JBAw&t=105s

Warning: Clip is mildly offensive

Re:gofumpt: It's like gofmt except more strict by metadat on Saturday February 11, 2023 @12:58AM (#34749957)
Ah well, maybe next time :)
Re:gofumpt: It's like gofmt except more strict by metadat on Saturday February 11, 2023 @01:17PM (#34754739)
Looks like next time is in fact happening now :D

Shfmt – format shell programs (like gofmt, rustfmt)

https://news.ycombinator.com/item?id=34754116

@typical182 - thanks for doing the thing!

Re:gofumpt: It's like gofmt except more strict by metadat on Saturday February 11, 2023 @01:55PM (#34755119)
Looks like next time is in fact happening now :D

Shfmt – format shell programs (like gofmt, rustfmt)

https://news.ycombinator.com/item?id=34754116

@typical182 - thanks for doing the thing!

Re:gofumpt: It's like gofmt except more strict by jpe90 on Saturday February 11, 2023 @02:07AM (#34750257)
oh awesome thanks for sharing! shfmt works very well so far. i've been using acme for a few weeks and need every formatter i can get :)

https://9fans.github.io/plan9port/man/man1/acme.html

Re:gofumpt: It's like gofmt except more strict by typical182 on Saturday February 11, 2023 @12:50PM (#34754511)
I just submitted shfmt separately:

https://news.ycombinator.com/item?id=34754116

It’s nice, and it probably deserves to be more widely known...

Re:gofumpt: It's like gofmt except more strict by k0k0r0 on Saturday February 11, 2023 @06:41AM (#34751447)
I checked the interfacer and I am a bit sad to that it

1) Is "deprecated" and literally the first sentence states its use is discouraged because often such suggestions are misleading and bad advise.

2) From the readme it appears it just suggest to changes of parameter types in functions to existing interfaces. I was hoping to see something that suggests interface definitions from existing types based on whether share methods with same names.

About 2) I guess it is indeed kind of unnecessary as such suggestions are kind of trivial. On the ither hand I recently started to learn how to use interfaces and I have kind of a difficult time to wrap my head around how to make idiomatic use of that concept. So even such trivial help would actually be of some use to me, simply because it removes some cognitive load and I be able to see many examples (even potentially bad, but compiling ones) in front of my eyes.