mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
contrib/go2docker: goimports
This commit is contained in:
parent
f6e1b77510
commit
5838854c27
@ -26,8 +26,8 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
@ -89,7 +89,7 @@ func main() {
|
|||||||
makeBashCmd := fmt.Sprintf("(cd %s; GOOS=linux GOARCH=amd64 ./make.bash --no-clean)", filepath.Dir(makeBash))
|
makeBashCmd := fmt.Sprintf("(cd %s; GOOS=linux GOARCH=amd64 ./make.bash --no-clean)", filepath.Dir(makeBash))
|
||||||
log.Fatalf("`go %s` toolchain not found: %v, run: %q", "linux_amd64", crossErr, makeBashCmd)
|
log.Fatalf("`go %s` toolchain not found: %v, run: %q", "linux_amd64", crossErr, makeBashCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
fpath, err := filepath.Abs(args[0])
|
fpath, err := filepath.Abs(args[0])
|
||||||
ext := filepath.Ext(fpath)
|
ext := filepath.Ext(fpath)
|
||||||
basename := filepath.Base(fpath[:len(fpath)-len(ext)])
|
basename := filepath.Base(fpath[:len(fpath)-len(ext)])
|
||||||
@ -124,7 +124,7 @@ func main() {
|
|||||||
if err := cmd.Wait(); err != nil {
|
if err := cmd.Wait(); err != nil {
|
||||||
log.Fatalf("command %q failed: %v", strings.Join(command, " "), err)
|
log.Fatalf("command %q failed: %v", strings.Join(command, " "), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
imageIDBytes := make([]byte, 32)
|
imageIDBytes := make([]byte, 32)
|
||||||
if _, err := rand.Read(imageIDBytes); err != nil {
|
if _, err := rand.Read(imageIDBytes); err != nil {
|
||||||
log.Fatalf("failed to generate ID: %v")
|
log.Fatalf("failed to generate ID: %v")
|
||||||
|
Loading…
Reference in New Issue
Block a user