internal/openapi/generator/data/Options.go   A
last analyzed

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
cc 4
eloc 22
dl 0
loc 31
ccs 0
cts 5
cp 0
crap 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A data.UseExamplesEnum.String 0 11 4
1
package data
2
3
type Options struct {
4
	UseExamples     UseExamplesEnum
5
	NullProbability float64
6
	DefaultMinInt   int64
7
	DefaultMaxInt   int64
8
	DefaultMinFloat float64
9
	DefaultMaxFloat float64
10
	SuppressErrors  bool
11
}
12
13
type UseExamplesEnum int
14
15
const (
16
	No UseExamplesEnum = iota
17
	IfPresent
18
	Exclusively
19
)
20
21
func (enum UseExamplesEnum) String() string {
22
	switch enum {
23
	case No:
24
		return "no"
25
	case IfPresent:
26
		return "if_present"
27
	case Exclusively:
28
		return "exclusively"
29
	}
30
31
	return "unknown"
32
}
33