<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Windows on DizzyLand</title><link>https://ka1hung.github.io/blog/tags/windows/</link><description>Recent content in Windows on DizzyLand</description><generator>Hugo -- 0.137.1</generator><language>en-us</language><lastBuildDate>Wed, 20 Mar 2024 10:37:55 +0800</lastBuildDate><atom:link href="https://ka1hung.github.io/blog/tags/windows/index.xml" rel="self" type="application/rss+xml"/><item><title>How to hide the Console window when running a Golang compiled file</title><link>https://ka1hung.github.io/blog/posts/how-to-hide-the-console-window-when-running-a-golang-compiled-file./</link><pubDate>Wed, 20 Mar 2024 10:37:55 +0800</pubDate><guid>https://ka1hung.github.io/blog/posts/how-to-hide-the-console-window-when-running-a-golang-compiled-file./</guid><description>&lt;h2 id="-ninja-ways-to-hide-console-window-in-go">🎯 Ninja Ways to Hide Console Window in Go&lt;/h2>
&lt;p>Ever wanted to make your Go applications look more professional by hiding that pesky console window? You&amp;rsquo;re in the right place! Let&amp;rsquo;s explore some ninja techniques to achieve this. 🥷&lt;/p>
&lt;h2 id="-method-1-the-quick-strike--ldflags">🚀 Method 1: The Quick Strike (-ldflags)&lt;/h2>
&lt;p>The simplest way to hide the console window is using build flags. Think of it as a stealth mode for your app!&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>go build -ldflags -H&lt;span style="color:#f92672">=&lt;/span>windowsgui main.go
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Pros:&lt;/p></description></item></channel></rss>