Code

< 40 %
40-60 %
> 60 %
1
package hkid
2
3
import "fmt"
4
5
type hkid struct {
6
	part1 string
7
	part2 string
8
	part3 string
9
}
10
11
func newHkidNil() *hkid {
12 1
	return &hkid{}
13
}
14
15
func newHkid(part1 string, part2 string, part3 string) *hkid {
16 1
	return &hkid{part1: clearString(part1), part2: part2, part3: clearString(part3)}
17
}
18
19
func (hkid *hkid) GetPart1() string {
20 1
	return hkid.part1
21
}
22
23
func (hkid *hkid) GetPart2() string {
24 1
	return hkid.part2
25
}
26
27
func (hkid *hkid) GetPart3() string {
28 1
	return hkid.part3
29
}
30
31
func (hkid *hkid) Format() string {
32 1
	return fmt.Sprintf("%s%s(%s)", hkid.part1, hkid.part2, hkid.part3)
33
}
34