tckimlik

package module
v0.0.0-...-1272eb4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 4 Imported by: 0

README

TC Identity

TC identity generator and validate

Run Your Computer

go get -u github.com/yisleyen/tckimlik
Generate Tc identity
package main

import (
	"fmt"
	"github.com/yisleyen/tckimlik"
)

func main()  {
	fmt.Println(tckimlik.Generate())
}
Validate Tc identity
package main

import (
	"fmt"
	"github.com/yisleyen/tckimlik"
	"log"
)

func main()  {
	valid, err := tckimlik.Validate("11111111111")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(valid)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = configuration{
	INVALIDLENGTH:             "Invalid length",
	INVALIDIDENTITY:           "Invalid TC Identity Number",
	INVALIDIDENTITYVALIDATION: "Invalid Identity Validation",
	INVALIDSUM:                "Invalid Sum Of Identity",
}

Functions

func Generate

func Generate() string

func RandomNumber

func RandomNumber(min int, max int) int

func Validate

func Validate(tcno 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