hkid.newHkid   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
nop 3
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