サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
画力アップ
www.calhoun.io
Moving Towards Domain Driven Design in Go The goal of this article is to help illustrate how an application might evolve over time so that we can understand some of the problems that a more domain driven design might help with. To that end, we are going to look at a fairly trivial project as it evolves over time. This project won’t be complete - the sample code won’t compile, isn’t tested with a c
Flat Application Structure in Go Rather than spending time trying to figure out how to break code into packages, an app with a flat structure would just place all of the .go files in a single package. A flat application structure is what almost everyone begins with when diving into Go. Every program in the Go tour, most exercises in Gophercises, and many others early Go programs don’t get broken i
How to determine if a JSON key has been set to null or not provided I was recently skimming my Twitter feed for new Go articles, libraries, etc and I stumbled across a tweet with this message: #Golang’s JSON Unmarshalling Is Bad I’m not even sure how it managed to find its way into my feed. I wasn’t following the person who said it, so the only reason it would show up in my feed is the #Golang has
Black Friday Sale! My Go courses are on sale until Nov 29. Save 50% on each course during the sale. Both courses have lifetime access, a 30-day money back guarantee, and free updates. Jon Calhoun Securing Cookies in Go When I first started learning Go I had experience with web development, but a little less experience working directly with cookies. I was coming from a Rails background, and while I
Black Friday Sale! My Go courses are on sale until Nov 29. Save 50% on each course during the sale. Both courses have lifetime access, a 30-day money back guarantee, and free updates. Jon Calhoun Using functional options instead of method chaining in Go In Java, it is pretty common to see libraries that use method chaining (aka the builder pattern) to construct resources. For example, we might con
// THIS IS NOT VALID CODE, but if it were we would be stating // that this specific List, demo, could only contain integer // values, and our compiler could help us verify that we // do not break that contract. var demo list.List<int> Unfortunately, there aren’t generics in Go. I don’t want to get into an argument about whether or not they are worth the added complexity here, but what I would like
5 Useful Ways to Use Closures in Go In this article we are going to explore several different real world use cases for closures and anonymous functions so that you can get a better understanding of when closures are a good fit, and see how they are applied to different situations. This article is part of the series An Introduction to Templates in Go. You may want to check out earlier articles befo
6 Tips for Using Strings in Go If you are coming to Go from another language like Ruby or Python there are a lot of changes to take in, and many of these revolve around the string type. Below is a list of some quick tips that answered questions I had during my first few weeks using Golang. 1.Multiline strings Creating a multiline string in Go is actually incredibly easy. Simply use the backtick (`
Using Functions Inside Go Templates In this tutorial we are going to cover how to use template functions like and, eq, and index to add some basic logic to our templates. Once we have a pretty good understanding of how to use these functions we will explore how to go about adding some custom functions to our templates and using them. This is part three of a four part series introducing the html/te
Controllers and Views in Go Chances are a lot of developers who pick up Go will be familiar with the MVC model. Models, views, and controllers are great for abstracting away code, but sadly there aren’t many examples of how to use them in Go. In this post I am going to go over how to get started with a basic controller and view in Go, and cover a really simple web application that uses them. While
このページを最初にブックマークしてみませんか?
『Calhoun.io - Go for Everyone』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く