Antonboom
Repos
17
Followers
47
Following
6

The Golang linter that checks that there is no simultaneous return of `nil` error and an invalid value.

12
2

The Golang linter that checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.

10
1

Codegen for functional options in go projects

36
2

The simple trading robot for Tinkoff's contest.

23
4

Events

issue comment
Support `x-enum-varnames` extension

+1 to x-enum-varnames feature

Created at 1 week ago

tasks/06-working-with-errors-in-tests/network-err-mock: anti hacks

Created at 2 weeks ago
Created at 2 weeks ago
started
Created at 3 weeks ago
Created at 4 weeks ago
issue comment
feat: add defer linter

Okay, does the linter ignore io.Closer and other functions from popular interfaces that are usually deferred?

I propose something like:

  • nackedefer (like nackedret)
  • novaluedefer (like nonamed)
  • puredefer, cleandefer, etc.
Created at 1 month ago
Created at 1 month ago
issue comment
feat: add defer linter

@rawen17, please, select more specific naming.

defer does not reflect the essence of the linter, as well as messages from it.

Moreover, it would be great to see among the examples something less abstract and closer to real life. Now it raise more questions than answers.

E.g., why is it invalid?

func funcDeferAnonymousReturnIntAndErr() {
	defer func() (int, error) { // want "deferred call should not return anything"
		return 1, nil
	}()
}

If you explain more clearly the reason of the linter, I can help with the name.

Thanks 👍

Created at 1 month ago
Created at 1 month ago
started
Created at 1 month ago

Tab in tmpl

Created at 1 month ago
pull request opened
Default value

Closes https://github.com/kazhuravlev/options-gen/issues/13

@kazhuravlev feature implementation in min view :)

If you think that such a partial implementation does not make sense and more complex things are needed, then I propose to close both MR and issue, because I also could not think of an elegant way to implement a more complex version.

This functionality is enough for my projects.

Created at 1 month ago
create branch
Antonboom create branch feat/default-value
Created at 1 month ago
issue comment
Unexpected behaviour: validating optional options

It was expected behaviour for me :)

I fixed it with omitempty, for example, validate:"omitempty,hexadecimal".

Created at 1 month ago
Created at 1 month ago

Custom validator

multifile test

Move validator and helpers to the module

Don't expected fmt twice

Fmt alias & GetValidatorFor

validator.Set

isPublic fn

collect warnings

print warnings

add -mute-warnings flag

fmt

Merge pull request #35 from Antonboom/feat/custom-validator

Custom validator (global level / struct level)

Merge branch 'master' into kazhuravlev/gh-27

Conflicts:

examples/library/main.go

Merge pull request #37 from kazhuravlev/kazhuravlev/gh-27

Added the warning for Options fields that were published

Created at 1 month ago

validator.Set

Created at 1 month ago
issue comment
Custom validator

Made pipelines green.

Created at 1 month ago

Fmt alias & GetValidatorFor

Created at 1 month ago
opened issue
x/tools/imports: Process do not remove used but duplicated imports

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Yes

What did you do?

https://go.dev/play/p/QEVFgl-HPhb

What did you expect to see?

import (
    "fmt"
)

For all cases.

What did you see instead?

import (
    "fmt"
)
import (
    "fmt"

    "fmt"
)
import (
    "fmt"

    "fmt"

    "fmt"
)
import (
    "fmt"

    "fmt"

    "fmt"
)

P.S. Related to https://github.com/golang/go/issues/37689, because fix for my issue is to add import aliases.

Created at 1 month ago