Skip to content

Instantly share code, notes, and snippets.

View utamori's full-sized avatar
🏠
Working from home

mori yuta utamori

🏠
Working from home
View GitHub Profile

How I Do Go Application Configuration in 2020

How I Do Go Application Configuration in 2020 - DEV Community 👩‍💻👨‍💻

Goアプリケーションでアプリケーションの設定を扱う方法はたくさんあります。

  • os.Getenv("MY_AWESOME_ENV") を使用したシンプルな環境変数
  • yaml/json/toml/hcl/envfile/java.propertiesファイルのパーサーライブラリ+残りは手動
  • 外部システムからの読み込み (例: etcd, consul, etc...) を、それぞれのライブラリやAPIを使って行う。
  • CLIフラグ

改行する 一件以上コミット 三件以上プロジェクト 共有するツールをかく レビューをもらって反映させた(4点)

Build a REST API with Golang from scratch: PostgreSQL with Gorm and Gin Web Framework 和訳

Build a REST API with Golang from scratch: PostgreSQL with Gorm and Gin Web Framework

Goはクラウド分野で人気があり、KubernetesやDockerのような大規模なクラウドネイティブプロジェクトで使用されています。並行処理、高性能、シンプルさなど、Goが提供するメリットを聞いたことがある人もいるかもしれません。 今日は、Goを使ってREST APIを構築する方法について、私の考えを共有したいと思います。

利用する技術は以下です

  • Gin
@utamori
utamori / viper_readme_jp.md
Last active July 7, 2020 10:01
[翻訳+α] Go言語の設定ファイルライブラリ Viper 最新版

はじめに

2016年の記事[翻訳+α] Go言語の設定ファイルライブラリ Viper - Qiitaを元に2020年6月最新のreadmeを翻訳します
書き終わったらREADME_jp.mdとしてプルリク送りますが、マージされない可能性もあるのでgistで公開しておきます。

変更箇所は、INI、envfileのサポート、一部APIの変更、追加、コード例の追加、くらいでした。


Viper Readme


title: "Create a Blog with Nuxt Content 和訳" description: 'The Content module is a git files based headless CMS that provides powerful features when it comes to write blogs, documentation sites or just adding content to any regular website. In this post we will go through most of the benefits of this module and discover how we can create a blog with it.' imgUrl: blog/creating-blog-with-nuxt-content/main.png date: 2020-07-02 authors:

cobra logo

Cobraは、パワフルでモダンなCLIアプリケーションを作成するためのライブラリであると同時に、アプリケーションやコマンドファイルを生成するためのプログラムでもあります。

CobraはいくつものGoプロジェクトで利用されています。KubernetesHugoGithub CLIなどなど。 このリストにはさらに多くのCobraを利用しているプロジェクトが載っています。

Build Status GoDoc Go Report Card