summaryrefslogtreecommitdiff
path: root/docs/tutorials/podman-go-bindings.md
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-20 14:28:38 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-02-22 09:03:51 +0100
commit5dded6fae7aebd7313cf90a60c388f417a1e64e2 (patch)
tree3c2923a82d5f38d5918b3f68b42467dbab0ac0c3 /docs/tutorials/podman-go-bindings.md
parent4a6582bd86572f0336c82577a0a4f315376c7179 (diff)
downloadpodman-5dded6fae7aebd7313cf90a60c388f417a1e64e2.tar.gz
podman-5dded6fae7aebd7313cf90a60c388f417a1e64e2.tar.bz2
podman-5dded6fae7aebd7313cf90a60c388f417a1e64e2.zip
bump go module to v3
We missed bumping the go module, so let's do it now :) * Automated go code with github.com/sirkon/go-imports-rename * Manually via `vgrep podman/v2` the rest Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'docs/tutorials/podman-go-bindings.md')
-rw-r--r--docs/tutorials/podman-go-bindings.md27
1 files changed, 12 insertions, 15 deletions
diff --git a/docs/tutorials/podman-go-bindings.md b/docs/tutorials/podman-go-bindings.md
index ddebf7e99..24381c75c 100644
--- a/docs/tutorials/podman-go-bindings.md
+++ b/docs/tutorials/podman-go-bindings.md
@@ -35,11 +35,8 @@ $ cd $HOME
$ mkdir example && cd example
$ go mod init example.com
go: creating new go.mod: module example.com
-$ go get github.com/containers/podman/v2@v2.0.4
-go: downloading github.com/containers/podman/v2 v2.0.4
-go get: github.com/containers/podman/v2@v2.0.4: parsing go.mod:
- module declares its path as: github.com/containers/libpod/v2
- but was required as: github.com/containers/podman/v2
+$ go get github.com/containers/podman/v3
+[...]
```
This creates a new `go.mod` file in the current directory that looks as follows:
@@ -47,9 +44,9 @@ This creates a new `go.mod` file in the current directory that looks as follows:
```bash
module example.com
-go 1.14
+go 1.16
-require github.com/containers/libpod/v2 v2.0.4 // indirect
+require github.com/containers/libpod/v3 v3.0.1 // indirect
```
You can also try a demo application with the Go modules created already:
@@ -136,12 +133,12 @@ import (
"fmt"
"os"
- "github.com/containers/libpod/v2/libpod/define"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/domain/entities"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/libpod/v3/libpod/define"
+ "github.com/containers/libpod/v3/pkg/bindings"
+ "github.com/containers/libpod/v3/pkg/bindings/containers"
+ "github.com/containers/libpod/v3/pkg/bindings/images"
+ "github.com/containers/libpod/v3/pkg/domain/entities"
+ "github.com/containers/libpod/v3/pkg/specgen"
)
func main() {
@@ -530,7 +527,7 @@ $
## Wrap Up
-Podman v2 provides a set of Go bindings to allow developers to integrate Podman
+Podman provides a set of Go bindings to allow developers to integrate Podman
functionality conveniently in their Go application. These Go bindings require
the Podman system service to be running in the background and this can easily
be achieved using systemd socket activation. Once set up, you are able to use a
@@ -539,7 +536,7 @@ containers and pods in a way which fits very nicely in many production environme
## References
-- Podman v2 is available for most major distributions along with MacOS and Windows.
+- Podman is available for most major distributions along with MacOS and Windows.
Installation details are available on the [Podman official website](https://podman.io/getting-started/).
- Documentation can be found at the [Podman Docs page](https://docs.podman.io).