From d0b66bd4ff4a93847bb3d990871caad6e50f0333 Mon Sep 17 00:00:00 2001 From: Mike Carifio Date: Mon, 16 May 2022 20:59:32 -0400 Subject: [PATCH] Add go.mod and replaces actions to get go 1.18 to compile (and run). --- chapter2/sample/.idea/.gitignore | 9 +++++++++ chapter2/sample/.idea/modules.xml | 8 ++++++++ chapter2/sample/.idea/sample.iml | 9 +++++++++ chapter2/sample/.idea/vcs.xml | 6 ++++++ chapter2/sample/go.mod | 17 +++++++++++++++++ chapter2/sample/matchers/go.mod | 2 ++ chapter2/sample/search/go.mod | 2 ++ 7 files changed, 53 insertions(+) create mode 100644 chapter2/sample/.idea/.gitignore create mode 100644 chapter2/sample/.idea/modules.xml create mode 100644 chapter2/sample/.idea/sample.iml create mode 100644 chapter2/sample/.idea/vcs.xml create mode 100644 chapter2/sample/go.mod create mode 100644 chapter2/sample/matchers/go.mod create mode 100644 chapter2/sample/search/go.mod diff --git a/chapter2/sample/.idea/.gitignore b/chapter2/sample/.idea/.gitignore new file mode 100644 index 00000000..e476a28b --- /dev/null +++ b/chapter2/sample/.idea/.gitignore @@ -0,0 +1,9 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +aws.xml diff --git a/chapter2/sample/.idea/modules.xml b/chapter2/sample/.idea/modules.xml new file mode 100644 index 00000000..dfcb143f --- /dev/null +++ b/chapter2/sample/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/chapter2/sample/.idea/sample.iml b/chapter2/sample/.idea/sample.iml new file mode 100644 index 00000000..5e764c4f --- /dev/null +++ b/chapter2/sample/.idea/sample.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/chapter2/sample/.idea/vcs.xml b/chapter2/sample/.idea/vcs.xml new file mode 100644 index 00000000..b2bdec2d --- /dev/null +++ b/chapter2/sample/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/chapter2/sample/go.mod b/chapter2/sample/go.mod new file mode 100644 index 00000000..7e640edf --- /dev/null +++ b/chapter2/sample/go.mod @@ -0,0 +1,17 @@ +// https://go.dev/ref/mod +// https://go.dev/doc/modules/gomod-ref +// https://www.digitalocean.com/community/tutorials/how-to-use-go-modules +// https://thewebivore.com/using-replace-in-go-mod-to-point-to-your-local-module/ + +module sample +go 1.18 + +replace github.com/goinaction/code/chapter2/sample/matchers => ./matchers +replace github.com/goinaction/code/chapter2/sample/search => ./search +require ( + github.com/goinaction/code/chapter2/sample/matchers v1.0.0 +) +require ( + github.com/goinaction/code/chapter2/sample/search v1.0.0 +) + diff --git a/chapter2/sample/matchers/go.mod b/chapter2/sample/matchers/go.mod new file mode 100644 index 00000000..9e8406ce --- /dev/null +++ b/chapter2/sample/matchers/go.mod @@ -0,0 +1,2 @@ +module matchers +go 1.18 diff --git a/chapter2/sample/search/go.mod b/chapter2/sample/search/go.mod new file mode 100644 index 00000000..24877a15 --- /dev/null +++ b/chapter2/sample/search/go.mod @@ -0,0 +1,2 @@ +module search +go 1.18