From cc633b5a6bb705fadc9c107ec51fd57c5c584701 Mon Sep 17 00:00:00 2001 From: guanguans Date: Tue, 12 Jan 2021 11:52:18 +0800 Subject: [PATCH] Rename `Upgrade` -> `UpgradeId` --- .gitignore | 18 ++++++++++++++++++ id_validator.go | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 42ae9c4..dc01812 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,21 @@ +# Created by .ignore support plugin (hsz.mobi) +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + .idea/ .DS_Store .history/ diff --git a/id_validator.go b/id_validator.go index 1343b51..803d208 100644 --- a/id_validator.go +++ b/id_validator.go @@ -122,7 +122,7 @@ func FakeRequireId(isEighteen bool, address string, birthday string, sex int) st } // 15位升级18位号码 -func Upgrade(id string) (string, error) { +func UpgradeId(id string) (string, error) { if !IsValid(id) { return "", errors.New("Not Valid ID card number.") }