From 532783cfac8835db537be5e68516c5c890f5e79d Mon Sep 17 00:00:00 2001 From: accenta Date: Sun, 29 Sep 2019 15:27:00 +0200 Subject: [PATCH 1/3] adapted to go1.13 linux --- errors/errors.go | 1 + 1 file changed, 1 insertion(+) create mode 100644 errors/errors.go diff --git a/errors/errors.go b/errors/errors.go new file mode 100644 index 0000000..04b3218 --- /dev/null +++ b/errors/errors.go @@ -0,0 +1 @@ +package errors From 20141cd0cb3cc41dcf3a7db9e053bc678c9eaafc Mon Sep 17 00:00:00 2001 From: accenta Date: Sun, 29 Sep 2019 15:31:43 +0200 Subject: [PATCH 2/3] adapted to go1.13 linux --- go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..1d902a9 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/amsokol/go-eccodes + +go 1.13 From 8f68bd99a9b82744dc0979cad51c8fda76bf6484 Mon Sep 17 00:00:00 2001 From: accenta Date: Sun, 29 Sep 2019 15:38:21 +0200 Subject: [PATCH 3/3] adapted to go1.13 linux --- cmd/example-get-all-messages-from-file/main.go | 2 +- cmd/example-get-messages-from-file-by-index/main.go | 2 +- errors/errors.go | 1 - file.go | 2 +- go.sum | 1 + native/eccodes-handle.go | 2 +- native/eccodes-index.go | 2 +- native/eccodes-keys-iterator.go | 2 +- native/eccodes-values.go | 2 +- native/{+linux_amd64.go => plus_linux_amd64.go} | 3 ++- native/{+windows_amd64.go => plus_windows_amd64.go} | 0 native/stdio.go | 2 +- 12 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 errors/errors.go create mode 100644 go.sum rename native/{+linux_amd64.go => plus_linux_amd64.go} (63%) rename native/{+windows_amd64.go => plus_windows_amd64.go} (100%) diff --git a/cmd/example-get-all-messages-from-file/main.go b/cmd/example-get-all-messages-from-file/main.go index adec0a9..7b79dbb 100644 --- a/cmd/example-get-all-messages-from-file/main.go +++ b/cmd/example-get-all-messages-from-file/main.go @@ -7,7 +7,7 @@ import ( "runtime/debug" "time" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" "github.com/amsokol/go-eccodes" cio "github.com/amsokol/go-eccodes/io" diff --git a/cmd/example-get-messages-from-file-by-index/main.go b/cmd/example-get-messages-from-file-by-index/main.go index 03df0fd..473f6c8 100644 --- a/cmd/example-get-messages-from-file-by-index/main.go +++ b/cmd/example-get-messages-from-file-by-index/main.go @@ -8,7 +8,7 @@ import ( "time" "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" "github.com/amsokol/go-eccodes" ) diff --git a/errors/errors.go b/errors/errors.go deleted file mode 100644 index 04b3218..0000000 --- a/errors/errors.go +++ /dev/null @@ -1 +0,0 @@ -package errors diff --git a/file.go b/file.go index 262f1f5..ca7af70 100644 --- a/file.go +++ b/file.go @@ -4,7 +4,7 @@ import ( "io" "runtime" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" "github.com/amsokol/go-eccodes/debug" cio "github.com/amsokol/go-eccodes/io" diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..47f3621 --- /dev/null +++ b/go.sum @@ -0,0 +1 @@ +github.com/amsokol/go-errors v0.0.0-20171006134924-ba7835dc5427/go.mod h1:qIXF05lwS6DpzJFTdD+z7Sxzgn4Ci2gobSJSGS/sauc= diff --git a/native/eccodes-handle.go b/native/eccodes-handle.go index fc7d568..c41ec5d 100644 --- a/native/eccodes-handle.go +++ b/native/eccodes-handle.go @@ -9,7 +9,7 @@ import ( "io" "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" ) func Ccodes_handle_new_from_index(index Ccodes_index) (Ccodes_handle, error) { diff --git a/native/eccodes-index.go b/native/eccodes-index.go index 4c0b2e9..92744ce 100644 --- a/native/eccodes-index.go +++ b/native/eccodes-index.go @@ -8,7 +8,7 @@ import "C" import ( "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" ) func Ccodes_index_new_from_file(ctx Ccodes_context, filename string, keys string) (Ccodes_index, error) { diff --git a/native/eccodes-keys-iterator.go b/native/eccodes-keys-iterator.go index c85f7b3..aaebf28 100644 --- a/native/eccodes-keys-iterator.go +++ b/native/eccodes-keys-iterator.go @@ -7,7 +7,7 @@ import "C" import ( "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" ) func Ccodes_keys_iterator_new(handle Ccodes_handle, flags int, namespace string) Ccodes_keys_iterator { diff --git a/native/eccodes-values.go b/native/eccodes-values.go index 65f8512..029f0e2 100644 --- a/native/eccodes-values.go +++ b/native/eccodes-values.go @@ -7,7 +7,7 @@ import "C" import ( "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" "github.com/amsokol/go-eccodes/debug" ) diff --git a/native/+linux_amd64.go b/native/plus_linux_amd64.go similarity index 63% rename from native/+linux_amd64.go rename to native/plus_linux_amd64.go index 4243322..593a39a 100644 --- a/native/+linux_amd64.go +++ b/native/plus_linux_amd64.go @@ -3,7 +3,8 @@ package native /* -#cgo LDFLAGS: -leccodes -leccodes_memfs -lpng -laec -ljasper -lopenjp2 -lz -lm +#cgo LDFLAGS: -leccodes -lpng -laec -lopenjp2 -lz -lm +//removed: -leccodes_memfs -ljasper */ import "C" diff --git a/native/+windows_amd64.go b/native/plus_windows_amd64.go similarity index 100% rename from native/+windows_amd64.go rename to native/plus_windows_amd64.go diff --git a/native/stdio.go b/native/stdio.go index a7e2b15..c9e36b2 100644 --- a/native/stdio.go +++ b/native/stdio.go @@ -8,7 +8,7 @@ import "C" import ( "unsafe" - "github.com/amsokol/go-errors" + "github.com/pkg/errors" ) func Cfopen(filename string, mode string) (CFILE, error) {