From 12a5605276ba4a3f928e30dc77dec3b3d6826601 Mon Sep 17 00:00:00 2001 From: pztrn Date: Sat, 8 Oct 2016 23:57:21 +0500 Subject: [PATCH] Fix for windows not to show console on launch. --- urtrator.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/urtrator.go b/urtrator.go index b0f1d36..a379689 100644 --- a/urtrator.go +++ b/urtrator.go @@ -18,6 +18,9 @@ import ( // stdlib "fmt" "runtime" + + // other + "github.com/couchbase/goutils/platform" ) func main() { @@ -26,6 +29,11 @@ func main() { numCPUs := runtime.NumCPU() runtime.GOMAXPROCS(numCPUs) + if runtime.GOOS == "windows" { + platform.HideConsole(true) + defer platform.HideConsole(false) + } + ctx := context.New() ctx.Initialize()