From 3c98c6245c7733f92c93e9932df535eace6cf795 Mon Sep 17 00:00:00 2001 From: Phlippe Moneda Date: Thu, 7 Sep 2017 12:46:02 -0300 Subject: [PATCH 1/3] Change barcorde width from 2 to 3 --- twooffive/encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twooffive/encoder.go b/twooffive/encoder.go index 73e7748..8ad0946 100644 --- a/twooffive/encoder.go +++ b/twooffive/encoder.go @@ -45,7 +45,7 @@ var ( start: []bool{true, false, true, false}, end: []bool{true, true, false, true}, widths: map[bool]int{ - true: 2, + true: 3, false: 1, }, }, From 69deaf2efbb48a9cfbb8b6050e0caf67e3a91b60 Mon Sep 17 00:00:00 2001 From: Philippe Moneda Date: Thu, 7 Sep 2017 18:05:37 -0300 Subject: [PATCH 2/3] fix tests --- twooffive/encoder_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twooffive/encoder_test.go b/twooffive/encoder_test.go index 007e5c6..1170d45 100644 --- a/twooffive/encoder_test.go +++ b/twooffive/encoder_test.go @@ -41,5 +41,5 @@ func Test_Encode(t *testing.T) { } testEncode(false, "12345670", "1101101011101010101110101110101011101110111010101010101110101110111010111010101011101110101010101011101110101011101110101101011") - testEncode(true, "12345670", "1010110100101011001101101001010011010011001010101010011001101101") + testEncode(true, "12345670", "111010001010111000111011101000101000111010001110001010101010001110001110") } From f2af0835590167e32d04ca73aa5fdf2775729345 Mon Sep 17 00:00:00 2001 From: Phlippe Moneda Date: Thu, 7 Sep 2017 18:29:58 -0300 Subject: [PATCH 3/3] Update encoder_test.go --- twooffive/encoder_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twooffive/encoder_test.go b/twooffive/encoder_test.go index 1170d45..6a529e3 100644 --- a/twooffive/encoder_test.go +++ b/twooffive/encoder_test.go @@ -41,5 +41,5 @@ func Test_Encode(t *testing.T) { } testEncode(false, "12345670", "1101101011101010101110101110101011101110111010101010101110101110111010111010101011101110101010101011101110101011101110101101011") - testEncode(true, "12345670", "111010001010111000111011101000101000111010001110001010101010001110001110") + testEncode(true, "12345670", "10101110100010101110001110111010001010001110100011100010101010100011100011101101") }