tckno

package module
v0.0.0-...-035a6a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 4 Imported by: 0

README

TC Identity Utils

Simple TC Identity number generator and validator (offline)

Getting Started

Install package on your project

$ go get -u github.com/peacecwz/tckno
Generate TC Identity Number

Generate TC Identity number. It's so simple

package main

import (
    "fmt"
    "github.com/peacecwz/tckno"
)

func main(){
    tckNo := tckno.Generate()
    fmt.Printf(tckNo)
}
Validate TC Identity Number
package main

import (
    "fmt"
    "github.com/peacecwz/tckno"
)

func main() {
    tckNo := "29896722612"
    result, _ := tckno.Validate(tckNo)
    if result {
        fmt.Printf("%s identity number valid", tckNo)
    }
}

License

This project is licensed under the MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() string

func Random

func Random(min int, max int) int

func Validate

func Validate(tckNumber string) (valid bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL