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
This commit is contained in:
parent
14db6622dd
commit
d857471aa2
4 changed files with 52 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
src/toolbox
|
25
src/cmd/root.go
Normal file
25
src/cmd/root.go
Normal file
|
@ -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)
|
||||
}
|
3
src/go.mod
Normal file
3
src/go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module github.com/containers/toolbox
|
||||
|
||||
go 1.13
|
23
src/toolbox.go
Normal file
23
src/toolbox.go
Normal file
|
@ -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()
|
||||
}
|
Loading…
Reference in a new issue