-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from sshaplygin/add-ogrn
add: ogrn and ogrnip
- Loading branch information
Showing
17 changed files
with
502 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Benchmarks | ||
|
||
## BIK | ||
|
||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/sshaplygin/docs-code/bik | ||
BenchmarkValidateCorrect-10 8064954 140.7 ns/op 256 B/op 3 allocs/op | ||
BenchmarkGenerate-10 615589 1972 ns/op 240 B/op 18 allocs/op | ||
PASS | ||
ok github.com/sshaplygin/docs-code/bik 2.635s | ||
|
||
## INN | ||
|
||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/sshaplygin/docs-code/inn | ||
BenchmarkValidateCorrectLegal-10 2719714 443.8 ns/op 616 B/op 23 allocs/op | ||
BenchmarkValidateCorrectPhysical-10 2076355 576.6 ns/op 936 B/op 30 allocs/op | ||
BenchmarkGenerate-10 394204 3133 ns/op 875 B/op 42 allocs/op | ||
BenchmarkGenerateLegal-10 354616 3213 ns/op 801 B/op 41 allocs/op | ||
BenchmarkGeneratePhysical-10 492985 2419 ns/op 974 B/op 41 allocs/op | ||
PASS | ||
ok github.com/sshaplygin/docs-code/inn 7.215s | ||
|
||
## KPP | ||
|
||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/sshaplygin/docs-code/kpp | ||
BenchmarkValidateCorrect-10 5280958 218.9 ns/op 216 B/op 8 allocs/op | ||
BenchmarkGenerate-10 484114 2434 ns/op 385 B/op 22 allocs/op | ||
PASS | ||
ok github.com/sshaplygin/docs-code/kpp 2.810s | ||
|
||
## OGRN | ||
|
||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/sshaplygin/docs-code/ogrn | ||
BenchmarkValidateCorrect-10 2583738 457.3 ns/op 728 B/op 18 allocs/op | ||
BenchmarkGenerate-10 294908 3938 ns/op 841 B/op 45 allocs/op | ||
PASS | ||
ok github.com/sshaplygin/docs-code/ogrn 3.074s | ||
|
||
## OGRNIP | ||
|
||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/sshaplygin/docs-code/ogrnip | ||
BenchmarkValidateCorrect-10 1991065 580.4 ns/op 1008 B/op 24 allocs/op | ||
BenchmarkGenerate-10 403179 3100 ns/op 1010 B/op 46 allocs/op | ||
PASS | ||
ok github.com/sshaplygin/docs-code/ogrnip 3.411s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ogrn | ||
|
||
import "errors" | ||
|
||
var ( | ||
// ErrNilOGRN try call methods for nil ogrn struct | ||
ErrNilOGRN = errors.New("nil ogrn struct") | ||
|
||
// ErrInvalidCodeType invalid code type | ||
ErrInvalidCodeType = errors.New("invalid code type") | ||
|
||
// ErrInvalidYearsNumbers invalid years number code | ||
ErrInvalidYearsNumbers = errors.New("invalid years number code") | ||
|
||
// ErrInvalidRegion invalid region code | ||
ErrInvalidRegion = errors.New("invalid region code") | ||
|
||
// ErrInvalidSerialNumbers invalid serial numbers | ||
ErrInvalidSerialNumbers = errors.New("invalid serial numbers") | ||
) |
Oops, something went wrong.