From d857471aa2f233e5c07d08ef1f82daef7ab3b6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harry=20M=C3=ADchal?= Date: Tue, 7 Apr 2020 21:34:59 +0200 Subject: [PATCH] Add a skeleton for the Go rewrite To build the Go, enter the src sub-directory and use 'go build': $ cd src $ go build https://github.com/containers/toolbox/pull/318 --- .gitignore | 1 + src/cmd/root.go | 25 +++++++++++++++++++++++++ src/go.mod | 3 +++ src/toolbox.go | 23 +++++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 .gitignore create mode 100644 src/cmd/root.go create mode 100644 src/go.mod create mode 100644 src/toolbox.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..225f1db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/toolbox diff --git a/src/cmd/root.go b/src/cmd/root.go new file mode 100644 index 0000000..d469662 --- /dev/null +++ b/src/cmd/root.go @@ -0,0 +1,25 @@ +/* + * Copyright © 2019 – 2020 Red Hat Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cmd + +import ( + "os" +) + +func Execute() { + os.Exit(0) +} diff --git a/src/go.mod b/src/go.mod new file mode 100644 index 0000000..bfc9b08 --- /dev/null +++ b/src/go.mod @@ -0,0 +1,3 @@ +module github.com/containers/toolbox + +go 1.13 diff --git a/src/toolbox.go b/src/toolbox.go new file mode 100644 index 0000000..f6f3ce7 --- /dev/null +++ b/src/toolbox.go @@ -0,0 +1,23 @@ +/* + * Copyright © 2019 – 2020 Red Hat Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import "github.com/containers/toolbox/cmd" + +func main() { + cmd.Execute() +}