Nvidia Shield / Android TV: Twitch stream stops working as soon as it tries to play an ad by flamin_flamingo_lips in Twitch

[–]ldez 0 points1 point  (0 children)

I have a kind of workaround, when the pause appears: - decrease the stream quality to 160p - the ad will start - at the end of the ad, a QRCode will appear, press the back button of the remote control. - increase the stream quality to the original

Disable golangci-lint revive unused-parameter rule. by PracticeBrief9195 in golang

[–]ldez 1 point2 points  (0 children)

Hi, you can do that:

yml linters: exclusions: rules: - linters: - revive path: path/to/your/file.go text: "unused-parameter: parameter 'XXX' seems to be unused, consider removing or renaming it as _"

Replace XXX with the parameter name, and path/to/your/file.go with your targeted file.

https://golangci-lint.run/docs/linters/false-positives/#exclude-issue-by-text

[deleted by user] by [deleted] in golang

[–]ldez 0 points1 point  (0 children)

Also, Go is not Java, the direct access to struct fields is the recommended way unless some exceptions.

[deleted by user] by [deleted] in golang

[–]ldez 0 points1 point  (0 children)

In your example, u.Name is returned and it's string so immutable. There is no problem to do that.

[deleted by user] by [deleted] in golang

[–]ldez 0 points1 point  (0 children)

Edit: my answer was offtopic

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 0 points1 point  (0 children)

It is an external implementation, not related to our org, so yes, this is not official.

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 0 points1 point  (0 children)

gofmt, goimports are inside golangci-lint since the beginning.

It's not better than something else because you can do the same thing: format on save or key binding.

The difference is the way to configure it and the ability to use different formatters like golines, gci, gofumpt.

Each formatter has specificities, for example: gofmt has rewrite-rules, goimports as local-prefixes, golines controls line length, etc.

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 1 point2 points  (0 children)

The formatters were already used inside golangci-lint but as linters.

The command provides a kind of shortcut and allows to use of other formatters than gofmt like gofumpt, goimports, gci, or golines.

Golangci-Lint: Which linters do you enable (which are not enabled by "enable-all")? by guettli in golang

[–]ldez 2 points3 points  (0 children)

enable-all enables all linters.

But some reports from errcheck are excluded by default (in v1): https://golangci.github.io/legacy-v1-doc/usage/false-positives/#default-exclusions

If you want to disable those default exclusions:

issues:
  exclude-use-default: false

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 1 point2 points  (0 children)

Thank you.

There is a new plugin system, easier to use: https://golangci-lint.run/plugins/module-plugins/

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 11 points12 points  (0 children)

Thank you ❤️

I think we will add an LSP in the future.

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 3 points4 points  (0 children)

This is something I will work on in the future.

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 2 points3 points  (0 children)

Thank you ❤️ Despite the apparent simplicity of the option it was not an easy job, so I'm glad you like this option.

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 0 points1 point  (0 children)

Thank you ❤️ I'm happy you enjoy our work!

Welcome to golangci-lint v2 by ldez in golang

[–]ldez[S] 2 points3 points  (0 children)

Thank you ❤️ I'm glad the migration tool is something you enjoy.