Skip to content

Commit 433ea8e

Browse files
committed
up: readme
1 parent 2f8990b commit 433ea8e

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,7 @@ It is not production ready public API! It is API could be change it the future.
1212

1313
Status of implementation by code package:
1414

15-
- [x] BIK
16-
- [x] Validate method
17-
- [x] Generate method
18-
- [x] Exists method
19-
- [x] INN
20-
- [x] Generate method
21-
- [x] Validate method
22-
- [ ] KPP
23-
- [ ] Generate method
24-
- [x] Validate method
25-
- [x] OGRN
15+
- [ ] OGRN
2616
- [x] Generate method
2717
- [ ] Validate method
2818
- [ ] OGRNIP
@@ -37,13 +27,15 @@ Status of implementation by code package:
3727
- [ ] SNILS
3828
- [ ] Generate method
3929
- [x] Validate method
40-
- [ ] Swift
30+
- [ ] SWIFT
4131
- [ ] Generate method
4232
- [ ] Validate method
4333
- [ ] KS
4434
- [ ] Generate method
4535
- [ ] Validate method
4636

37+
Full supported codes: BIK, INN, KPP
38+
4739
## Usage
4840

4941
``` bash
@@ -57,18 +49,20 @@ go get github.com/sshaplygin/docs-code
5749
import (
5850
"log"
5951

60-
"github.com/sshaplygin/docs-code/inn"
52+
"github.com/sshaplygin/docs-code"
6153
)
6254

6355
...
6456

65-
isValid, err := inn.Validate("526317984689")
57+
isValid, err := docs_code.Validate(docs_code.INN, "526317984689")
6658
if err != nil {
67-
log.Error(err)
59+
log.Error(err)
6860
}
69-
if isValid {
70-
log.Println("INN is valid")
61+
if !isValid {
62+
log.Println("INN is invalid")
63+
return
7164
}
65+
log.Println("INN is valid")
7266
```
7367

7468
## Documentation

0 commit comments

Comments
 (0)