Skip to content

ezysign/go-mm-nrc-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-mm-nrc-Converter

Go Report Card Build Status GitHub issues GitHub forks GitHub stars GitHub license

Go-mm-nrc-converter is a Burmese National Registration Card(NRC) tool written in Golang. Inspired by NRC-Prefixer and Burther for android.

	nrcConverter := converter.NewNRCConverter()
	nrcConverter.ConvertToEnglishFormat("၁၂/မစသ(သ)၀၈၇၆၄၅"))
	nrcConverter.ConvertToBurmeseFormat("12/MaCaSa(M)087645")

//Output: 12/MaCaSa(M)087645
//Output: ၁၂/မစသ(သ)၀၈၇၆၄၅

go-mm-nrc-converter supports all NRC types with the following pattern

Burmese English
နိုင်ငံသား (နိုင်) Citizen (C)
ဧည့်နိုင်ငံသား (ဧည့်) Associate Citizen (AC)
နိုင်ငံသားပြုခွင့်ရသူ (ပြု) Naturalized Citizen (NC)
နိုင်ငံသားပြုစီစစ်ခံရမည့်သူ (စ) National Verification (V)
သာသနာဝင် (သ) Monk (M)
သာသနာနွယ်ဝင် (သီ) Nun (N)

Getting Started

Add Dependency

go get github.com/ezysign/go-mm-nrc-converter/converter

Features

Validation

go-mm-nrc-converter provide a validation of NRCNumbers in both English & Burmese.

package main

import (
	"fmt"
	"github.com/ezysign/go-mm-nrc-converter/converter"
)

func  main() {
	nrcConverter := converter.NewNRCConverter()
	nrcConverter.ValidateEnglishNRC("12/MaGaTa(နိုင်)198475"))
	nrcConverter.ValidateBurmeseNRC("၁၂/မစလ(နိုင်)၀၈၇၆၄၅"))
}
//Output: false
//Output: true

Conversion

go-mm-nrc-converter provide a conversion of NRCNumbers in both English & Burmese.

package main

import (
	"fmt"
	"github.com/ezysign/go-mm-nrc-converter/converter"
)

func  main() {
	nrcConverter := converter.NewNRCConverter()
	nrcConverter.ConvertToEnglishFormat("၁၂/မစသ(သ)၀၈၇၆၄၅"))
	nrcConverter.ConvertToBurmeseFormat("12/MaCaSa(M)087645")
}
//Output: 12/MaCaSa(M)087645
//Output: ၁၂/မစသ(သ)၀၈၇၆၄၅

Playground

https://play.golang.org/p/DxK_WotOrUy

Contributing

  1. Fork it (https://github.com/ezysign/go-mm-nrc-converter)
  1. Create your feature branch (git checkout -b my-new-feature)
  1. Commit your changes (git commit -am 'Add some feature')
  1. Push to the branch (git push origin my-new-feature)
  1. Create a new Pull Request

License

Copyright 2020 EzySign

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Myanmar NRC(National Registration Card) Tool for Golang

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages