Fix for windows not to show console on launch.
This commit is contained in:
parent
e2a9298f85
commit
12a5605276
@ -18,6 +18,9 @@ import (
|
|||||||
// stdlib
|
// stdlib
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
|
// other
|
||||||
|
"github.com/couchbase/goutils/platform"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -26,6 +29,11 @@ func main() {
|
|||||||
numCPUs := runtime.NumCPU()
|
numCPUs := runtime.NumCPU()
|
||||||
runtime.GOMAXPROCS(numCPUs)
|
runtime.GOMAXPROCS(numCPUs)
|
||||||
|
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
platform.HideConsole(true)
|
||||||
|
defer platform.HideConsole(false)
|
||||||
|
}
|
||||||
|
|
||||||
ctx := context.New()
|
ctx := context.New()
|
||||||
ctx.Initialize()
|
ctx.Initialize()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user