-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename package + some public to private
- Loading branch information
Showing
7 changed files
with
34 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
module "go_hkid" | ||
module hkid | ||
|
||
go 1.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
package go_hkid | ||
package hkid | ||
|
||
type HkidResult struct { | ||
hkid *Hkid | ||
type result struct { | ||
hkid *hkid | ||
Valid bool | ||
} | ||
|
||
func (h *HkidResult) GetPart1() string { | ||
func (h *result) GetPart1() string { | ||
return h.hkid.GetPart1() | ||
} | ||
|
||
func (h *HkidResult) GetPart2() string { | ||
func (h *result) GetPart2() string { | ||
return h.hkid.GetPart2() | ||
} | ||
|
||
func (h *HkidResult) GetPart3() string { | ||
func (h *result) GetPart3() string { | ||
return h.hkid.GetPart3() | ||
} | ||
|
||
func (h *HkidResult) Format() string { | ||
func (h *result) Format() string { | ||
return h.hkid.Format() | ||
} | ||
|
||
func NewHkidResultWithValid(hkid *Hkid, valid bool) *HkidResult { | ||
return &HkidResult{hkid: hkid, Valid: valid} | ||
func NewHkidResultWithValid(hkid *hkid, valid bool) *result { | ||
return &result{hkid: hkid, Valid: valid} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
package go_hkid | ||
package hkid | ||
|
||
import "fmt" | ||
|
||
type Hkid struct { | ||
type hkid struct { | ||
part1 string | ||
part2 string | ||
part3 string | ||
} | ||
|
||
func NewHkidNil() *Hkid { | ||
return &Hkid{} | ||
func newHkidNil() *hkid { | ||
return &hkid{} | ||
} | ||
|
||
func NewHkid(part1 string, part2 string, part3 string) *Hkid { | ||
return &Hkid{part1: clearString(part1), part2: part2, part3: clearString(part3)} | ||
func newHkid(part1 string, part2 string, part3 string) *hkid { | ||
return &hkid{part1: clearString(part1), part2: part2, part3: clearString(part3)} | ||
} | ||
|
||
func (hkid *Hkid) GetPart1() string { | ||
func (hkid *hkid) GetPart1() string { | ||
return hkid.part1 | ||
} | ||
|
||
func (hkid *Hkid) GetPart2() string { | ||
func (hkid *hkid) GetPart2() string { | ||
return hkid.part2 | ||
} | ||
|
||
func (hkid *Hkid) GetPart3() string { | ||
func (hkid *hkid) GetPart3() string { | ||
return hkid.part3 | ||
} | ||
|
||
func (hkid *Hkid) Format() string { | ||
func (hkid *hkid) Format() string { | ||
return fmt.Sprintf("%s%s(%s)", hkid.part1, hkid.part2, hkid.part3) | ||
} |