Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 576 Bytes

README.md

File metadata and controls

36 lines (23 loc) · 576 Bytes

hkidchecker

Checker/validator for Hong Kong IDs

Description

This Go package validates Hong Kong ID card IDs. Useful for example for validating form input.

Getting Started

Installing

go get -u github.com/PatrLind/hkidchecker

Example

package main

import (
    "fmt"

    "github.com/PatrLind/hkidchecker"
)

func main() {
    hkid := "E364912(5)"
    valid := hkidchecker.CheckHKID(hkid)
    fmt.Printf("HKID '%s' valid: %t\n", hkid, valid)
}

License

This project is licensed under the MIT License - see the LICENSE.md file for details