<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Go on Thorsten Hans</title>
		<link>https://thorsten-hans.com/tags/go/</link>
		<description>Recent content in Go on Thorsten Hans</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Wed, 14 Dec 2022 08:18:27 +0100</lastBuildDate>
		
			<atom:link href="https://thorsten-hans.com/tags/go/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Azure Blob Storage using the Azure SDK for Go</title>
				<link>https://thorsten-hans.com/azure-blob-storage-using-azure-sdk-for-golang/</link>
				<pubDate>Wed, 14 Dec 2022 08:18:27 +0100</pubDate>
				<guid>https://thorsten-hans.com/azure-blob-storage-using-azure-sdk-for-golang/</guid>
				<description>&lt;p&gt;The Azure SDK team reworked the SDK for Go and released a bunch of Go modules to interact with popular cloud services - not just from a management perspective. In this post, we will take a closer look at the Go-modules for interacting with blob storage capabilities offered by Azure Storage Account.&lt;/p&gt;&#xA;&lt;p&gt;When interacting with Azure services, we must authenticate. The Azure SDK for Go supports different authentication patterns and flows. For demonstration purposes and to keep things simple, we’ll address two different authentication approaches as part of this article:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Check if your application is running in a Docker container</title>
				<link>https://thorsten-hans.com/check-if-application-is-running-in-docker-container/</link>
				<pubDate>Thu, 21 Apr 2022 17:22:42 +0000</pubDate>
				<guid>https://thorsten-hans.com/check-if-application-is-running-in-docker-container/</guid>
				<description>&lt;p&gt;Especially when building cloud-native applications, we tend to develop applications that run in any environment. We design components, so we can run them with or without container technologies to ensure we can host the application on different application platforms. However, sometimes we may have to determine if our applications are running inside a Docker container or not. This allows us to take particular actions at runtime without adding additional environment variables or configuration values (state). Every container has a &lt;code&gt;.dockerenv&lt;/code&gt; file in the file system&amp;rsquo;s root. That said, we can quickly check for the existence of that file to determine reliably if our application runs inside a container or not. For demonstration purposes, this post shows how to determine if the application is executed in a container using Go and Rust.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Let&#39;s build a CLI in Go with Cobra</title>
				<link>https://thorsten-hans.com/lets-build-a-cli-in-go-with-cobra/</link>
				<pubDate>Tue, 29 Mar 2022 16:13:54 +0200</pubDate>
				<guid>https://thorsten-hans.com/lets-build-a-cli-in-go-with-cobra/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://cobra.dev/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Cobra&lt;/a&gt;&#xA; is perhaps the most popular Go-module to build powerful command-line applications (CLIs) in almost no time. This article will look at what Cobra is, its core concepts, and which features it brings to the table for building CLI applications.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://thorsten-hans.com/lets-build-a-cli-in-go-with-cobra/images/cobra-logo.png&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;h4&gt;https://github.com/spf13/cobra&lt;/h4&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Through this article, we will build &lt;code&gt;stringer&lt;/code&gt;, a fairly simple CLI application. &lt;code&gt;stringer&lt;/code&gt;allows its users to reverse and inspect strings. Although the feature set is not that big, it is just enough to use and understand the core concepts of Cobra.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Automate Azure with Azure Functions and Go</title>
				<link>https://thorsten-hans.com/automate-azure-with-azure-functions-and-go/</link>
				<pubDate>Sat, 18 Dec 2021 10:52:45 +0000</pubDate>
				<guid>https://thorsten-hans.com/automate-azure-with-azure-functions-and-go/</guid>
				<description>&lt;p&gt;Automation is key to success in the cloud. In this article, we will look at how to automate recurring tasks using &lt;a href=&#34;https://pkg.go.dev/github.com/Azure/azure-sdk-for-go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure SDK for Go&lt;/a&gt;&#xA; with Azure Functions. This article contributes to the &lt;a href=&#34;https://golang.christmas/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go Advent Calendar&lt;/a&gt;&#xA;🎄. If you haven&amp;rsquo;t heard about it, you should check out all the awesome content contributed to the Go Advent Calendar and level up your Go programming skill during the holiday season.&lt;/p&gt;&#xA;&lt;p&gt;The sample code shown in this article can be found &lt;a href=&#34;https://github.com/ThorstenHans/go-advent&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;in this repository on GitHub&lt;/a&gt;&#xA;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Azure Functions with Go</title>
				<link>https://thorsten-hans.com/azure-functions-with-go/</link>
				<pubDate>Tue, 17 Aug 2021 13:15:14 +0000</pubDate>
				<guid>https://thorsten-hans.com/azure-functions-with-go/</guid>
				<description>&lt;p&gt;By leveraging custom handlers in Azure Functions, we can use any programming language to build serverless applications and host them in Azure.Having the freedom to use your preferred programming language to craft Azure Functions is awesome. Developers can use their existing knowledge, tools, and frameworks. The integration with the surrounding runtime is done via a thin configuration layer.&lt;/p&gt;&#xA;&lt;p&gt;For example, this post demonstrates how to build an Azure Functions project with a simple HTTP API written in Go. To keep things simple, we will use &lt;a href=&#34;https://github.com/gin-gonic/gin&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Gin, a minimalistic web framework for Go&lt;/a&gt;&#xA;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
