Passed
Push — main ( 15e900...9a9510 )
by Igor
01:02 queued 11s
created

is.UPCE   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package is
2
3
import "github.com/muonsoft/validation/validate"
4
5
// EAN8 checks that string contains valid EAN-8 code.
6
//
7
// See https://en.wikipedia.org/wiki/EAN-8.
8
func EAN8(value string) bool {
9
	return validate.EAN8(value) == nil
10
}
11
12
// EAN13 checks that string contains valid EAN-13 code.
13
//
14
// See https://en.wikipedia.org/wiki/International_Article_Number.
15
func EAN13(value string) bool {
16
	return validate.EAN13(value) == nil
17
}
18
19
// UPCA checks that string contains valid UPC-A code.
20
//
21
// See https://en.wikipedia.org/wiki/Universal_Product_Code.
22
func UPCA(value string) bool {
23
	return validate.UPCA(value) == nil
24
}
25
26
// UPCE checks that string contains valid UPC-E code.
27
//
28
// See https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E.
29
func UPCE(value string) bool {
30
	return validate.UPCE(value) == nil
31
}
32