From 64d043de2c6be544e0014ddd64b7d80d01a69be6 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Wed, 5 Jan 2022 10:48:07 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20typo=20in=20stage=20name=20Postmachine?= =?UTF-8?q?=E2=86=92PostMachine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christopher Obbard --- cmd/debos/debos.go | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/cmd/debos/debos.go b/cmd/debos/debos.go index 07d46177..53c71475 100644 --- a/cmd/debos/debos.go +++ b/cmd/debos/debos.go @@ -50,37 +50,36 @@ func warnLocalhost(variable string, value string) { Consider using an address that is valid on your network.` if strings.Contains(value, "localhost") || - strings.Contains(value, "127.0.0.1") || - strings.Contains(value, "::1") { + strings.Contains(value, "127.0.0.1") || + strings.Contains(value, "::1") { log.Printf(message, variable) } } - func main() { - context := debos.DebosContext { &debos.CommonContext{}, "", "" } + context := debos.DebosContext{&debos.CommonContext{}, "", ""} var options struct { - Backend string `short:"b" long:"fakemachine-backend" description:"Fakemachine backend to use" default:"auto"` - ArtifactDir string `long:"artifactdir" description:"Directory for packed archives and ostree repositories (default: current directory)"` - InternalImage string `long:"internal-image" hidden:"true"` - TemplateVars map[string]string `short:"t" long:"template-var" description:"Template variables (use -t VARIABLE:VALUE syntax)"` - DebugShell bool `long:"debug-shell" description:"Fall into interactive shell on error"` - Shell string `short:"s" long:"shell" description:"Redefine interactive shell binary (default: bash)" optionsl:"" default:"/bin/bash"` - ScratchSize string `long:"scratchsize" description:"Size of disk backed scratch space"` - CPUs int `short:"c" long:"cpus" description:"Number of CPUs to use for build VM (default: 2)"` - Memory string `short:"m" long:"memory" description:"Amount of memory for build VM (default: 2048MB)"` - ShowBoot bool `long:"show-boot" description:"Show boot/console messages from the fake machine"` - EnvironVars map[string]string `short:"e" long:"environ-var" description:"Environment variables (use -e VARIABLE:VALUE syntax)"` - Verbose bool `short:"v" long:"verbose" description:"Verbose output"` - PrintRecipe bool `long:"print-recipe" description:"Print final recipe"` - DryRun bool `long:"dry-run" description:"Compose final recipe to build but without any real work started"` - DisableFakeMachine bool `long:"disable-fakemachine" description:"Do not use fakemachine."` + Backend string `short:"b" long:"fakemachine-backend" description:"Fakemachine backend to use" default:"auto"` + ArtifactDir string `long:"artifactdir" description:"Directory for packed archives and ostree repositories (default: current directory)"` + InternalImage string `long:"internal-image" hidden:"true"` + TemplateVars map[string]string `short:"t" long:"template-var" description:"Template variables (use -t VARIABLE:VALUE syntax)"` + DebugShell bool `long:"debug-shell" description:"Fall into interactive shell on error"` + Shell string `short:"s" long:"shell" description:"Redefine interactive shell binary (default: bash)" optionsl:"" default:"/bin/bash"` + ScratchSize string `long:"scratchsize" description:"Size of disk backed scratch space"` + CPUs int `short:"c" long:"cpus" description:"Number of CPUs to use for build VM (default: 2)"` + Memory string `short:"m" long:"memory" description:"Amount of memory for build VM (default: 2048MB)"` + ShowBoot bool `long:"show-boot" description:"Show boot/console messages from the fake machine"` + EnvironVars map[string]string `short:"e" long:"environ-var" description:"Environment variables (use -e VARIABLE:VALUE syntax)"` + Verbose bool `short:"v" long:"verbose" description:"Verbose output"` + PrintRecipe bool `long:"print-recipe" description:"Print final recipe"` + DryRun bool `long:"dry-run" description:"Compose final recipe to build but without any real work started"` + DisableFakeMachine bool `long:"disable-fakemachine" description:"Do not use fakemachine."` } // These are the environment variables that will be detected on the // host and propagated to fakemachine. These are listed lower case, but // they are detected and configured in both lower case and upper case. - var environ_vars = [...]string { + var environ_vars = [...]string{ "http_proxy", "https_proxy", "ftp_proxy", @@ -331,7 +330,7 @@ func main() { for _, a := range r.Actions { err = a.PostMachine(&context) - if handleError(&context, err, a, "Postmachine") { + if handleError(&context, err, a, "PostMachine") { return } }