Skip to content

Commit

Permalink
basic app
Browse files Browse the repository at this point in the history
  • Loading branch information
somnek committed Feb 6, 2023
1 parent 4611b72 commit 2a700c8
Show file tree
Hide file tree
Showing 5 changed files with 1,175 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.env
.vscode
whale

# Binaries for programs and plugins
*.exe
Expand Down
30 changes: 30 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package main

import (
"fmt"
"log"

docker "github.com/fsouza/go-dockerclient"
)

func listContainers(c *docker.Client) {
imgs, err := c.ListImages(docker.ListImagesOptions{All: false})
if err != nil {
log.Fatal(err)
}

for _, img := range imgs {
fmt.Println("ID", img.ID)
}
}

func listImages(c *docker.Client) {
imgs, err := c.ListImages(docker.ListImagesOptions{All: false})
if err != nil {
log.Fatal(err)
}

for _, img := range imgs {
fmt.Println("ID", img.ID)
}
}
33 changes: 33 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
module github.com/somnek/killer-whale.git

go 1.19

require (
github.com/fsouza/go-dockerclient v1.9.3
github.com/spf13/cobra v1.6.1
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Microsoft/hcsshim v0.9.6 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/containerd v1.6.14 // indirect
github.com/docker/docker v20.10.23+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/moby/sys/mount v0.3.3 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/runc v1.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/tools v0.1.12 // indirect
)
Loading

0 comments on commit 2a700c8

Please sign in to comment.