From 712de1c63d9db97c81af68cd0dc4372c53d2e57a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 15 Sep 2020 18:05:35 +0200 Subject: vendor/github.com/golangci/golangci-lint: update to v1.31 --- vendor/github.com/tdakkota/asciicheck/README.md | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'vendor/github.com/tdakkota') diff --git a/vendor/github.com/tdakkota/asciicheck/README.md b/vendor/github.com/tdakkota/asciicheck/README.md index fc62811be..a7ff5884f 100644 --- a/vendor/github.com/tdakkota/asciicheck/README.md +++ b/vendor/github.com/tdakkota/asciicheck/README.md @@ -7,6 +7,34 @@ Simple linter to check that your code does not contain non-ASCII identifiers go get -u github.com/tdakkota/asciicheck/cmd/asciicheck ``` +# Reason to use +So, do you see this code? Looks correct, isn't it? + +```go +package main + +import "fmt" + +type TеstStruct struct{} + +func main() { + s := TestStruct{} + fmt.Println(s) +} +``` +But if you try to run it, you will get an error: +``` +./prog.go:8:7: undefined: TestStruct +``` +What? `TestStruct` is defined above, but compiler thinks diffrent. Why? + +**Answer**: +Because `TestStruct` is not `TеstStruct`. +``` +type TеstStruct struct{} + ^ this 'e' (U+0435) is not 'e' (U+0065) +``` + # Usage asciicheck uses [`singlechecker`](https://pkg.go.dev/golang.org/x/tools/go/analysis/singlechecker) package to run: -- cgit mrf-deployment