From fb1cee65645ce91dfc277a42bca344fd22f42b44 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Wed, 5 Feb 2020 09:24:56 -0600 Subject: [PATCH] feat: update version to v3 for release (#29) - New interface and signatures (breaking changes) - Initial support RFC 3164 Signed-off-by: Chris Goller --- README.md | 2 +- go.mod | 4 +++- nontransparent/example_test.go | 2 +- nontransparent/parser.go | 4 ++-- nontransparent/parser.go.rl | 4 ++-- nontransparent/parser_test.go | 4 ++-- octetcounting/example_test.go | 2 +- octetcounting/parser.go | 4 ++-- octetcounting/parser_test.go | 6 +++--- rfc3164/machine.go | 4 ++-- rfc3164/machine.go.rl | 4 ++-- rfc3164/machine_test.go | 4 ++-- rfc3164/options.go | 2 +- rfc3164/parser.go | 2 +- rfc3164/syslog_message.go | 4 ++-- rfc5424/builder.go | 2 +- rfc5424/builder.go.rl | 2 +- rfc5424/builder_test.go | 2 +- rfc5424/machine.go | 4 ++-- rfc5424/machine.go.rl | 4 ++-- rfc5424/machine_test.go | 4 ++-- rfc5424/options.go | 2 +- rfc5424/parser.go | 2 +- rfc5424/parser_test.go | 4 ++-- rfc5424/performance_test.go | 4 ++-- rfc5424/syslog_message.go | 4 ++-- syslog.go | 2 +- 27 files changed, 45 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index d29ca6e..2d39279 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ For example: ## Installation ``` -go get github.com/influxdata/go-syslog/v2 +go get github.com/influxdata/go-syslog/v3 ``` ## Docs diff --git a/go.mod b/go.mod index 37469c3..500d0d7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/influxdata/go-syslog/v2 +module github.com/influxdata/go-syslog/v3 require ( github.com/davecgh/go-spew v1.1.1 @@ -6,3 +6,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/testify v1.2.2 ) + +go 1.13 diff --git a/nontransparent/example_test.go b/nontransparent/example_test.go index 0d50e94..2dfc0be 100644 --- a/nontransparent/example_test.go +++ b/nontransparent/example_test.go @@ -6,7 +6,7 @@ import ( "math/rand" "strings" - "github.com/influxdata/go-syslog/v2" + "github.com/influxdata/go-syslog/v3" "time" ) diff --git a/nontransparent/parser.go b/nontransparent/parser.go index 937e012..4eae95d 100644 --- a/nontransparent/parser.go +++ b/nontransparent/parser.go @@ -3,8 +3,8 @@ package nontransparent import ( "io" - syslog "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/rfc5424" + syslog "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/rfc5424" parser "github.com/leodido/ragel-machinery/parser" ) diff --git a/nontransparent/parser.go.rl b/nontransparent/parser.go.rl index 67e7f70..1dde434 100644 --- a/nontransparent/parser.go.rl +++ b/nontransparent/parser.go.rl @@ -4,8 +4,8 @@ import ( "io" parser "github.com/leodido/ragel-machinery/parser" - syslog "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/rfc5424" + syslog "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/rfc5424" ) %%{ diff --git a/nontransparent/parser_test.go b/nontransparent/parser_test.go index 91f046f..239d1ed 100644 --- a/nontransparent/parser_test.go +++ b/nontransparent/parser_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/rfc5424" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/rfc5424" "github.com/leodido/ragel-machinery" "github.com/stretchr/testify/assert" ) diff --git a/octetcounting/example_test.go b/octetcounting/example_test.go index f88c2cb..362cb04 100644 --- a/octetcounting/example_test.go +++ b/octetcounting/example_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" - syslog "github.com/influxdata/go-syslog/v2" + syslog "github.com/influxdata/go-syslog/v3" ) func output(out interface{}) { diff --git a/octetcounting/parser.go b/octetcounting/parser.go index b9546be..c1f0c88 100644 --- a/octetcounting/parser.go +++ b/octetcounting/parser.go @@ -4,8 +4,8 @@ import ( "fmt" "io" - syslog "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/rfc5424" + syslog "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/rfc5424" ) // parser is capable to parse the input stream containing syslog messages with octetcounting framing. diff --git a/octetcounting/parser_test.go b/octetcounting/parser_test.go index 0c32a31..764cd5d 100644 --- a/octetcounting/parser_test.go +++ b/octetcounting/parser_test.go @@ -5,9 +5,9 @@ import ( "strings" "testing" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/rfc5424" - syslogtesting "github.com/influxdata/go-syslog/v2/testing" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/rfc5424" + syslogtesting "github.com/influxdata/go-syslog/v3/testing" "github.com/stretchr/testify/assert" ) diff --git a/rfc3164/machine.go b/rfc3164/machine.go index 1a189b7..497bac4 100644 --- a/rfc3164/machine.go +++ b/rfc3164/machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) var ( diff --git a/rfc3164/machine.go.rl b/rfc3164/machine.go.rl index b0d39e5..c617a31 100644 --- a/rfc3164/machine.go.rl +++ b/rfc3164/machine.go.rl @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) var ( diff --git a/rfc3164/machine_test.go b/rfc3164/machine_test.go index d7b108d..1d3fc4a 100644 --- a/rfc3164/machine_test.go +++ b/rfc3164/machine_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/influxdata/go-syslog/v2" - syslogtesting "github.com/influxdata/go-syslog/v2/testing" + "github.com/influxdata/go-syslog/v3" + syslogtesting "github.com/influxdata/go-syslog/v3/testing" "github.com/stretchr/testify/assert" ) diff --git a/rfc3164/options.go b/rfc3164/options.go index 6dfd6fa..383578a 100644 --- a/rfc3164/options.go +++ b/rfc3164/options.go @@ -3,7 +3,7 @@ package rfc3164 import ( "time" - syslog "github.com/influxdata/go-syslog/v2" + syslog "github.com/influxdata/go-syslog/v3" ) // WithBestEffort enables the best effort mode. diff --git a/rfc3164/parser.go b/rfc3164/parser.go index a0624df..f31b588 100644 --- a/rfc3164/parser.go +++ b/rfc3164/parser.go @@ -3,7 +3,7 @@ package rfc3164 import ( "sync" - syslog "github.com/influxdata/go-syslog/v2" + syslog "github.com/influxdata/go-syslog/v3" ) // parser represent a RFC3164 parser with mutex capabilities. diff --git a/rfc3164/syslog_message.go b/rfc3164/syslog_message.go index c344bf9..0ac3674 100644 --- a/rfc3164/syslog_message.go +++ b/rfc3164/syslog_message.go @@ -3,8 +3,8 @@ package rfc3164 import ( "time" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) type syslogMessage struct { diff --git a/rfc5424/builder.go b/rfc5424/builder.go index 99e28a2..3b31ddc 100644 --- a/rfc5424/builder.go +++ b/rfc5424/builder.go @@ -5,7 +5,7 @@ import ( "sort" "time" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3/common" ) // todo(leodido) > support best effort for builder ? diff --git a/rfc5424/builder.go.rl b/rfc5424/builder.go.rl index c45a77e..919049f 100644 --- a/rfc5424/builder.go.rl +++ b/rfc5424/builder.go.rl @@ -5,7 +5,7 @@ import ( "sort" "fmt" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3/common" ) // todo(leodido) > support best effort for builder ? diff --git a/rfc5424/builder_test.go b/rfc5424/builder_test.go index b4a3815..f9ac4e7 100644 --- a/rfc5424/builder_test.go +++ b/rfc5424/builder_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/influxdata/go-syslog/v2" + "github.com/influxdata/go-syslog/v3" "github.com/stretchr/testify/assert" ) diff --git a/rfc5424/machine.go b/rfc5424/machine.go index 3d6e4db..85cbec0 100644 --- a/rfc5424/machine.go +++ b/rfc5424/machine.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) // ColumnPositionTemplate is the template used to communicate the column where errors occur. diff --git a/rfc5424/machine.go.rl b/rfc5424/machine.go.rl index a444a38..421a4ed 100644 --- a/rfc5424/machine.go.rl +++ b/rfc5424/machine.go.rl @@ -4,8 +4,8 @@ import ( "time" "fmt" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) // ColumnPositionTemplate is the template used to communicate the column where errors occur. diff --git a/rfc5424/machine_test.go b/rfc5424/machine_test.go index 691eebe..4bb00c3 100644 --- a/rfc5424/machine_test.go +++ b/rfc5424/machine_test.go @@ -5,8 +5,8 @@ import ( "math/rand" "testing" - "github.com/influxdata/go-syslog/v2" - syslogtesting "github.com/influxdata/go-syslog/v2/testing" + "github.com/influxdata/go-syslog/v3" + syslogtesting "github.com/influxdata/go-syslog/v3/testing" "github.com/stretchr/testify/assert" ) diff --git a/rfc5424/options.go b/rfc5424/options.go index e83173d..755e4e9 100644 --- a/rfc5424/options.go +++ b/rfc5424/options.go @@ -1,7 +1,7 @@ package rfc5424 import ( - syslog "github.com/influxdata/go-syslog/v2" + syslog "github.com/influxdata/go-syslog/v3" ) // WithBestEffort enables the best effort mode. diff --git a/rfc5424/parser.go b/rfc5424/parser.go index a4ef241..31417aa 100644 --- a/rfc5424/parser.go +++ b/rfc5424/parser.go @@ -3,7 +3,7 @@ package rfc5424 import ( "sync" - syslog "github.com/influxdata/go-syslog/v2" + syslog "github.com/influxdata/go-syslog/v3" ) // parser represent a RFC5424 parser with mutex capabilities. diff --git a/rfc5424/parser_test.go b/rfc5424/parser_test.go index 1c8f6dd..65f2f7a 100644 --- a/rfc5424/parser_test.go +++ b/rfc5424/parser_test.go @@ -3,8 +3,8 @@ package rfc5424 import ( "testing" - "github.com/influxdata/go-syslog/v2" - syslogtesting "github.com/influxdata/go-syslog/v2/testing" + "github.com/influxdata/go-syslog/v3" + syslogtesting "github.com/influxdata/go-syslog/v3/testing" "github.com/stretchr/testify/assert" ) diff --git a/rfc5424/performance_test.go b/rfc5424/performance_test.go index 73e72ae..7f42241 100644 --- a/rfc5424/performance_test.go +++ b/rfc5424/performance_test.go @@ -3,8 +3,8 @@ package rfc5424 import ( "testing" - "github.com/influxdata/go-syslog/v2" - syslogtesting "github.com/influxdata/go-syslog/v2/testing" + "github.com/influxdata/go-syslog/v3" + syslogtesting "github.com/influxdata/go-syslog/v3/testing" ) // This is here to avoid compiler optimizations that diff --git a/rfc5424/syslog_message.go b/rfc5424/syslog_message.go index 2a20327..9f944a3 100644 --- a/rfc5424/syslog_message.go +++ b/rfc5424/syslog_message.go @@ -3,8 +3,8 @@ package rfc5424 import ( "time" - "github.com/influxdata/go-syslog/v2" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3" + "github.com/influxdata/go-syslog/v3/common" ) type syslogMessage struct { diff --git a/syslog.go b/syslog.go index 878d42e..db628a2 100644 --- a/syslog.go +++ b/syslog.go @@ -6,7 +6,7 @@ import ( "io" "time" - "github.com/influxdata/go-syslog/v2/common" + "github.com/influxdata/go-syslog/v3/common" ) // BestEfforter is an interface that wraps the HasBestEffort method.