Socket
Book a DemoInstallSign in
Socket

mygithub.libinneed.workers.dev/sshaplygin/docs-code

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mygithub.libinneed.workers.dev/sshaplygin/docs-code

Go Modules
Version
v0.1.5
Version published
Created
Source

docs-code

GoDoc Go Coverage License Go Report Card

It is validator about official of documents codes in Go

Alert

It is not production ready public API! It is API could be change it the future. To be attentive for this.

Status

Status of implementation by code package:

  • OKATO
    • Generate method
    • Validate method
  • SNILS
    • Generate method
    • Validate method

Full supported codes: BIK, INN, KPP, OGRN, OGRNIP

Usage

go get github.com/sshaplygin/docs-code

Example


import (
	"log"
	
	"github.com/sshaplygin/docs-code"
)

...

isValid, err := docs_code.Validate(docs_code.INN, "526317984689")
if err != nil {
  log.Error(err)
}
if !isValid {
  log.Println("INN is invalid")
} else {
  log.Println("INN is valid")
}

Documentation

FAQs

Package last updated on 07 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts