GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( dbcb3a...736483 )
by Victor Hugo
01:11 queued 12s
created

idempotency.NewStdGenerator   A

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
c 0
b 0
f 0
ccs 1
cts 1
cp 1
crap 1
rs 10
nop 0
1
package idempotency
2
3
import "github.com/google/uuid"
4
5
type stdGenerator struct{}
6
7
// Generate encapsulates the logic to return a string representation of
8
// a unique idempotency key.
9
//
10
// A string representation of a v4 uuid for this implementation.
11
func (ikg stdGenerator) Generate() string {
12 1
	return uuid.New().String()
13
}
14
15
// NewStdGenerator returns an standard and common way of generating
16
// idempotency unique keys.
17
func NewStdGenerator() KeyGenerator {
18 1
	return new(stdGenerator)
19
}
20