並び順

ブックマーク数

期間指定

  • から
  • まで

81 - 120 件 / 1749件

新着順 人気順

golangの検索結果81 - 120 件 / 1749件

  • Building an interactive shell in Golang

    Go is great for building command-line applications. We built one: Dolt, the world's first version-controlled SQL database. We wrote our own command line parser for handling all of Dolt's subcommands and arguments, but maybe we shouldn't have. There are lots of great ones out there that if we might have used instead if we were starting the project today: spf13/cobra has great support for code gener

      Building an interactive shell in Golang
    • golang gopkg.inからpackageがinstallできなくなって個人の開発環境へdeployできなくて困ったけど解決した話

      # go run app.go go: finding github.com/census-instrumentation/opencensus-proto v0.2.1 go: finding github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 go: finding golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 go: finding golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e go: finding golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 go: finding google.golang.org/api v0

        golang gopkg.inからpackageがinstallできなくなって個人の開発環境へdeployできなくて困ったけど解決した話
      • Golang のEcho で Prometheus Exporter を実装する - じゃあ、おうちで学べる

        はじめに Prometheus でアプリケーションの構築をしているとどうしてもこの値が取りたいのに... と思うことが多々ある。Pushgateway も選択肢として上げられるが今回は選択肢を増やしてほしいという意味でもExporterの実装方法について検討していきます。ExporterはPrometheusのpull モデルに適合し、監視対象のライフサイクルと一貫性があり、スケーラビリティと自動検出の利点を享受できるため、Pushgatewayよりも推奨される方法です。ただし、特定のユースケース(サービスレベルのバッチジョブなど)では、Pushgatewayの使用が適切な場合もあります。Pushgatewayを使う際には以下の問題点があるので注意が必要です。 複数のインスタンスを1つのPushgatewayで監視すると、単一障害点とボトルネックが発生する可能性がある。 Prometheu

          Golang のEcho で Prometheus Exporter を実装する - じゃあ、おうちで学べる
        • Backend Engineer, Golang - 採用情報 (日本)

          At Apple, new ideas have a way of becoming excellent products, services, and customer experiences very quickly. Bring passion and dedication to your job and there's no telling what you could accomplish. Are you ready to do your life’s best work? Are you deeply accountable for your work? Your real passion for product ownership and track record of product development will prove critical to your succ

          • golang.org/x/tools/go/analysis を使ってコードを自動修正する - tchsskのブログ

            これは Go3 Advent Calendar 2019 の 3 日目の記事です。 今年 2 月にリリースされた Go 1.12 において、 公式の静的解析ツールである go vet が golang.org/x/tools/go/analysis を使う形に書き直されました。 Analyzer golang.org/x/tools/go/analysis は Analyzer (静的解析モジュール) を作るためのパッケージで、 go vet が行う様々な処理は個別の Analyzer として分離されこのパッケージ配下に格納されています。これらは外部からも参照できるようになっており、サードパーティの Analyzer から参照することもできます。 Diagnostic Analyzer は、解析して見つかった問題を Diagnostic (診断) として報告します。 Diagnostic

              golang.org/x/tools/go/analysis を使ってコードを自動修正する - tchsskのブログ
            • [ Golang ] Facebook / ent のER図をGitHub Actionsで自動更新する

              ER図とは ER図のEはエンティティ(Entity)の略で、Rはリレーションシップ(Relationship)の略です。つまりER図は「エンティティ=モノ」と「リレーションシップ=関係」の組み合わせでシステムのデータやデータ間の処理構造を設計します。例として「顧客が商品を注文する」という処理をER図で表すと以下のようになります。 簡潔に説明をすると、ER図とはテーブル間の関係を表した図です。 RDBのようなデータベースを用いてシステムの開発および運用を行う際に、テーブル間の関係を直感的に理解できるようになります。 なぜER図が必要か 実運用を行なっているシステムとなるとテーブル数が数十に及ぶことが多々ありますので、ER図のようなものなしでは複数のテーブル間の関係を把握することが困難となります。 なぜ自動更新が必要か ER図の様なドキュメントは、日々の忙しい開発業務の中では大抵の場合優先順位

                [ Golang ] Facebook / ent のER図をGitHub Actionsで自動更新する
              • bmf-tech.com - GolangでgoblinというURLルーターを自作した

                概要 GolangでURLルーターを自作したので実装するまでの過程をメモしておく。 準備 URLルーターを実装する際に行った下準備をまとめる。 データ構造とアルゴリズム URLをどのようにマッチングさせるか、というロジックについて検討する。 多くのライブラリでは、データ構造として木構造がよく扱われているので、どんな種類の木構造を採用するかを考えてみた。 文字列探索に特化した木の中で、時間的・メモリ的計算量がよりベストなものを選定しようとすると、基数木というのが良さそうに見えるので最初はそれを採用しようとしていたのだが、実装が難し過ぎて挫折をした。 もう少し身近でシンプルなものをということでトライ木を採用することにした。 net/httpのコードリーディング net/httpが持つマルチプレクサの拡張として実装を行うため、内部の仕組みについてある程度理解しておく必要がある。 GolangのH

                  bmf-tech.com - GolangでgoblinというURLルーターを自作した
                • GitHub - hedhyw/rex: Flexible regular expressions constructor for Golang.

                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                    GitHub - hedhyw/rex: Flexible regular expressions constructor for Golang.
                  • golang.org/x/text 配下のパッケージをいくつか紹介する - Qiita

                    はじめに 今回は準標準の golang.org/x/text 配下のパッケージを紹介します。 ここではは主に多言語、多locale対応の際の文字列操作をサポートするパッケージが管理されています。 アジア圏などの文字管理に考慮事項が多いlocaleに関してはそれ向けに特化したパッケージなども提供されています。 今日はその中からいくつかのパッケージを紹介したいと思います。 これは Go6 Advent Calendar 2019 の投稿です(ちょっと遅刻しました) golang.org/x/text/number doc: https://golang.org/x/text/number このパッケージは、言語による数値表現の差分を吸収してくれます。 出力の際は同じく準標準のパッケージである https://golang.org/x/text/message をつかって出力できます。 例えば英

                      golang.org/x/text 配下のパッケージをいくつか紹介する - Qiita
                    • Golang(aws-sdk-go)でDynamoDBを操作するための基礎知識 - シー・エス・エス イノベーションラボ(ブログ)

                      皆さん、初めまして。資産運用システム課の藤田です。 私はこのたび社内のスキルチェンジプロジェクトに配属され、今まで触れてこなかった技術を学ぶ楽しさを知りました。 スキルチェンジプロジェクトとは、AWSおよび開発技術習得を目的とし、このプロジェクトに参加した経験を活かして、新しい知識・技術を効率的にインプット及びアウトプットできることを目標としています。 スキルチェンジプロジェクトについて詳しく説明した記事はこちら👇 blog.css-net.co.jp この場をお借りして、自力でGo言語とAWSサービスのDynamoDBについて理解できたことをアウトプットさせていただきます。概要としては、DynamoDBの基礎知識を紹介し、DynamoDBを実際にGo言語(aws-sdk-go)で操作した内容をお伝えします。 1.DynamoDBについて 2.DynamoDBで使われる用語 3.セカンダ

                        Golang(aws-sdk-go)でDynamoDBを操作するための基礎知識 - シー・エス・エス イノベーションラボ(ブログ)
                      • devio-2024-Introduction-golang-backend

                        I Don’t Have Time: Getting Over the Fear to Launch Your Podcast

                          devio-2024-Introduction-golang-backend
                        • Go言語(golang)における値渡しとポインタ渡しのパフォーマンス影響について

                          Finatextでエンジニアをやっている山崎 康行と申します。 前回は、「Vue on IonicでWebエンジニアがネイティブアプリの夢を見る」というフロントエンドに関する記事でした。 今回は、Finatextではバックエンドの実装に主にGo言語を採用しているということで、Go言語に関する記事を書きたいと思います。 はじめにGo言語を使っていると、関数の引数や、メソッドのレシーバを、値にすべきなのかポインタにすべきなのか悩むことが良くあります。 公式ドキュメントによると、 https://golang.org/doc/faq#methods_on_values_or_pointers (日本語訳:http://golang.jp/go_faq#methods_on_values_or_pointers) ざっくりまとめると、 呼び出し元の値を変える必要があるなら、ポインタ引数(レシーバ)

                            Go言語(golang)における値渡しとポインタ渡しのパフォーマンス影響について
                          • 今すぐ「レイヤードアーキテクチャ+DDD」を理解しよう。(golang) - Qiita

                            とはいっても記事を読み終わるのに三時間くらいかかる気がします。 対象読者 レイヤードアーキテクチャ+DDDの実装に困っている方 バックエンドエンジニアを目指す学生 APIサーバを開発したことがある方 はじめに アーキテクチャは学習コストが高いと言われています。その要因の一つとして考えられるのはアーキテクチャの概念を学んだとしても、アーキテクチャの細かい部分は実装者に左右されるので、ネット上にあるプログラムは概念とはズレがあるので混乱しやすいことだと思います。それに加えて他のサイトを参考にした時もやはり実装者による違いで混乱してしまうからです。 したがって、概念とズレがある部分はしっかり言及したうえで解説することが良いと思います。 アーキテクチャを採用する意味 レイヤ間が疎結合になるため、ユニットテストが行いやすいこと。 責務がはっきりしているので、保守性が高いこと。 途中からフレームワーク

                              今すぐ「レイヤードアーキテクチャ+DDD」を理解しよう。(golang) - Qiita
                            • GoLang Desktop App with webview/Lorca, WASM and Bazel

                              On my quest towards building a GoLang Desktop application I found some useful frameworks, Lorca and Webview (which I wrote about in my previous post). These frameworks create a window which GoLang can inject HTML, CSS, and JavaScript to build the UI. But I don’t want to write JavaScript(!) and deal with all the complexities that comes with it like npm, webpack, typescript… Fortunately, I can just

                                GoLang Desktop App with webview/Lorca, WASM and Bazel
                              • GitHub - tomcraven/goga: Golang Genetic Algorithm

                                Goga is a genetic algorithm solution written in Golang. It is used and configured by injecting different behaviours into the main genetic algorithm object. The main injectable components are the simulator, selector and mater. The simulator provides a function that accepts a single genome and assigns a fitness score to it. The higher the fitness, the better the genome has done in the simulation. A

                                  GitHub - tomcraven/goga: Golang Genetic Algorithm
                                • Lies we tell ourselves to keep using Golang

                                  Contents The author is a platypus Mom smokes, so it's probably okay The good parts Go is an island All or nothing (so let's do nothing) "Rust is perfect and you're all idiots" Go as a prototyping/starter language In the two years since I've posted I want off Mr Golang's Wild Ride, it's made the rounds time and time again, on Reddit, on Lobste.rs, on HackerNews, and elsewhere. And every time, it el

                                    Lies we tell ourselves to keep using Golang
                                  • Running Golang on the browser with WebAssembly and TinyGo

                                    TL;DR This is the story of how I managed to expose my Golang chess API project cheesse as a WebAssembly binary, compiled using TinyGo, so JavaScript could use it without needing a server. The blogpost is optimised for helping others going through a similar exercise, rather than for readability, so expect a little too much of “if this, do this”. Sorry. What are all those technologies? WebAssembly A

                                    • Golang Select Query [PostgreSQL MySQL]

                                      # APITo see the full list of supported methods, see SelectQueryopen in new window. db.NewSelect(). With("cte_name", subquery). Model(&strct). Model(&slice). Column("col1", "col2"). // quotes column names ColumnExpr("col1, col2"). // arbitrary unsafe expression ColumnExpr("count(*)"). ColumnExpr("count(?)", bun.Ident("id")). ColumnExpr("(?) AS alias", subquery). ExcludeColumn("col1"). // all column

                                      • React + Golang + websocketでリアルタイムチャットアプリを作る -Part1/websocket編-

                                        はじめに websocketについて何となく理解していたものの、実際実装したことはありませんでした なので今回Client側にReact, Server側にGoを利用して、 1:Nでリアルタイムにテキストメッセージのやりとりができるシンプルなチャットアプリを作ってみます また、サーバーのスケールアウトにも対応できるようにRedisのPub/Subも取り入れます ※長くなったのでPub/SubはPart2にて! 利用する技術とか Client ・ React 18 ・ TypeScript ・ Vite ・ Recoil Server ・ Golang 1.18 ・ gorilla/websocket その他ミドルウェア ・ Docker,docker-compose ※Part1のソースコード全文はこちら Part1の最終的なディレクトリ構成はこんな感じ(一部省略) . ├── docke

                                          React + Golang + websocketでリアルタイムチャットアプリを作る -Part1/websocket編-
                                        • Golang フレームワーク比較 - Qiita

                                          結果 Echo Beego Martini, Gin, Revel, goa goMicro goKit 特徴、気付いたこと Beego フルスタックなWebアプリケーションフレームワーク。ORマッパーまでサポート。RubyのSinatraを元に設計されている。 Gin 比較的軽量なフルスタックWebアプリケーションフレームワーク。マティーニと類似のAPIを提供している。 Martini モジュール形式のWebアプリケーションサービスフレームワーク。 Revel JavaのPlay Frameworkを参考に設計されたフルスタックフレームワーク。 Echo RESTAPI向けのため、RESTの原則に沿った形で設計されたAPIを持っている。Ginを超える程の高速処理。 Goa デザインコード(goa API Design Language) のファイルを作成するだけで、マイクロサービスのコア

                                            Golang フレームワーク比較 - Qiita
                                          • Benchmarking low-level I/O: C, C++, Rust, Golang, Java, Python

                                            This post is a continuation of Measuring network service performance. When my computer doesn’t have an Internet connection, I find that there is not much I can do with it. Indeed, we mostly use our laptops and smartphones to access information stored or generated somewhere else. It’s even hard to imagine the utility of non-user facing apps without network communication. While the proportion of I/O

                                              Benchmarking low-level I/O: C, C++, Rust, Golang, Java, Python
                                            • GitHub - opencoff/go-tunnel: TLS/SSL Tunnel - A modern STunnel replacement written in golang

                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                GitHub - opencoff/go-tunnel: TLS/SSL Tunnel - A modern STunnel replacement written in golang
                                              • 「Golangのstringsパッケージ:これだけは知っておきたいメソッド17選」 - Qiita

                                                Contains 文字列検索 strings.Contains(s, substr string) bool: このメソッドは、与えられた部分文字列 'substr' が文字列 's' に含まれているかどうかをチェックするために使用されます。部分文字列が見つかった場合は、trueを返します。そうでない場合は、falseを返します。 package main import ( "fmt" "strings" ) func main() { var str = "hello world" var substr = "world" var result = strings.Contains(str, substr) fmt.Println(result) // true } Index 文字列検索 strings.Index(s, substr string) int: このメソッドは、文字列

                                                  「Golangのstringsパッケージ:これだけは知っておきたいメソッド17選」 - Qiita
                                                • Golangのパッケージ完全に理解した

                                                  Golang のパッケージがよくわかってなかったんで自分なりにまとめてみました。 この記事は Go7 Advent Calendar 2019 3日目の記事です。 Go7のカレンダー | Advent Calendar 2019 - QiitaGo7のカレンダーページです。https://qiita.com/advent-calendar/2019/go7 この記事中で使われる環境は以下の docker-compose.yaml で用意しました。 使わなくても検証できますが、実行環境がない人やホスト環境を汚したくない人は使ってください。 info当該Docker環境での $GOPATH は /go に設定されています。import 文基本的な構文であるimport文についても軽く整理しておきます。 Golangでは自身とは異なるパッケージを利用できるようにするために import文を使いま

                                                    Golangのパッケージ完全に理解した
                                                  • GolangでTrie木を車輪の再発明した話 - KAYAC Engineers' Blog

                                                    こんにちは! Tech KAYAC Advent Calendar 2020 4日目を担当する荒賀(@ken39arg) です。 近況報告 毎年このアドベントカレンダーの場をかりて、趣味の長距離スポーツの結果を報告して承認欲求を満たしていたのですが、 昨年サブスリーを達成して今年はサブエガ1を目指していたフルマラソンの大会は中止となり、夏の趣味であるOWS2の大会も軒並み中止となってしまいました。 その代わりに今年は2018年に買って未クリアだったゼルダをプレイし、ハイラルの平和をなんとか今年中に取り戻せるように努力をしております。 Trie木が必要になった経緯 さて、アドベントカレンダーだからツリー → ツリーといえば我々の世界では木構造 → 木構造といえばトライ木ということではなく、 今年した仕事でTrie木を実装する機会があったので、その時の気づきを書いてみようかと思います。 今年ユ

                                                      GolangでTrie木を車輪の再発明した話 - KAYAC Engineers' Blog
                                                    • How I keep myself Alive using Golang

                                                      In this blog I explore how I use an incident management mindset to manage a complex medical condition. I hope you enjoy it!

                                                        How I keep myself Alive using Golang
                                                      • redefining for loop variable semantics · golang/go · Discussion #56010

                                                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                          redefining for loop variable semantics · golang/go · Discussion #56010
                                                        • 【Golang + echo】S3のファイルをバイナリデータでレスポンスする - カミナシ エンジニアブログ

                                                          はじめに この記事はGo 4 Advent Calendar 2020 17日目の記事です。 こんにちは、株式会社カミナシのエンジニア @imuです。 早速ですが、S3にあるファイルをバイナリデータで取得してレスポンスに含めたいと思ったことはありませんか? 『カミナシ』ではバッチ処理でファイルを作成してS3にファイルをアップロードした後、Client側でファイルをダウンロードする機能があります。 よくある処理はClient側からAWSにアクセスをしてファイルをダウンロードする方法ですが、今回はAPI側を経由してファイルをダウンロードする方法について書きたいと思います! ファイルをバイナリデータとしてレスポンスに含めたいがうまくいかず、困っている方の参考になれば幸いです! この記事で分かること API側でS3ファイルをダウンロードせずに取得する方法 取得したファイルをレスポンスに含める方法(

                                                            【Golang + echo】S3のファイルをバイナリデータでレスポンスする - カミナシ エンジニアブログ
                                                          • GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.

                                                            Actor Model: enables the creation of scalable and fault-tolerant systems using isolated actors that interact through message passing. Actors can exchange asynchronous messages as well as perform synchronous requests, offering flexibility in communication patterns. Network Transparency: actors can interact regardless of their physical location, supported by a high-performance implementation of the

                                                              GitHub - ergo-services/ergo: An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.
                                                            • QuoteとUnquote #golang - tenntenn.dev

                                                              Quoteを行う Goで文字列を""で括って(Quoteして)表示したい場合、fmt.Printf関数を用いて行うことが多いでしょう。 package main import "fmt" func main() { fmt.Printf(`"%s"`, "hoge") } これを実行すると以下のようになります。 $ go run main.go "hoge" 文字列中に"が含まれていた場合に、Goのソースコード上の文字列のようにエスケープする場合には%qが便利でしょう。 package main import "fmt" func main() { fmt.Printf("%[1]s %[1]q\n", "hoge") fmt.Printf("%[1]s %[1]q\n", `"fuga"`) } これを実行すると以下のようになります。 $ go run main.go hoge "hog

                                                              • golangで作るQUICプロトコル(Initial Packetの送信まで)

                                                                はじめに つい最近HTTP3のRFC9114として正式に発行されました。 HTTP3はQUICプロトコル上で実装されているものです。 HTTP3はGoogleのTOPページなど既に日常的に使われています。 業務でQUICやHTTP3でコードを書くことはまだあまりないと思いますが、まぁいずれそういう時代もくるでしょう。 そういう時が来たときにあたふたするわけにはいかないので、今回はQUICとHTTP3プロトコルスタックを実装して学んでみることにします。 今回のルールとゴールです。 udpパケットの送信と受信にnetパッケージを使用する TLSは自分で実装したものを使用、crypto/tlsは使わない RFC9000とRFC9001とWiresharkでパケット見ながら実装 quic-goは使わない quic-goのHTTP3サーバに対してGetリクエストを送り、サーバからメッセージを受信した

                                                                  golangで作るQUICプロトコル(Initial Packetの送信まで)
                                                                • 【第11回】Go言語(Golang)入門~FCM送信編~ - 株式会社ライトコード

                                                                  (株)ライトコードの笹川(ささがわ)です! 今回は、Firebase Cloud Messaging(FCM)をGoで送信して、Androidで受け取ってみようと思います。 それでは、いってみましょう! 前回の記事はこちら 2019.11.13【第10回】Go言語(Golang)入門~ObjectBox活用編~第10回~Go言語(Golang)入門~笹川先生(株)ライトコードの笹川(ささがわ)です!今回は、前回に引き続き、Ob... Firebaseの認証をしよう FCMは、Firebaseのサービスのひとつなので、Firebaseへの認証が必要となります。 そのため、まずは、認証を終わらせましょう! 1package main 2 3import ( 4 "context" 5 "log" 6 7 "cloud.google.com/go/firestore" 8 firebase "f

                                                                    【第11回】Go言語(Golang)入門~FCM送信編~ - 株式会社ライトコード
                                                                  • GolangのWebAPIをsupervisorでデーモン化して公開する。 - Qiita

                                                                    GolangのWebAPIをデーモン化して公開する際に役立った情報の備忘録です。 使用環境 Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type (無料使用枠) デーモン化とは そもそもGolangのWebAPIを公開する方法を知らず、Linux上で"GO RUN main.go"を実行すればよいのかと考えていた。この方法だと、RLoginなどで接続を閉じたタイミングで処理も終了してしまって上手く行かなかった。 調べるうちに、デーモン(UNIX系OSにおいて、常時待機しているプログラムを指す)というものに行きついた。[Golang デーモン]で検索すると多数ヒットしたので、Golangのmain.goを常駐化させる方針を立てた。

                                                                      GolangのWebAPIをsupervisorでデーモン化して公開する。 - Qiita
                                                                    • GitHub - Yash-Handa/logo-ls: Modern ls command with vscode like File Icon and Git Integrations. Written in Golang

                                                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                        GitHub - Yash-Handa/logo-ls: Modern ls command with vscode like File Icon and Git Integrations. Written in Golang
                                                                      • GitHub - gzuidhof/tygo: Generate Typescript types from Golang source code

                                                                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                          GitHub - gzuidhof/tygo: Generate Typescript types from Golang source code
                                                                        • 【DDD】Golangを使ってモデルでドメイン知識を表現してみた

                                                                          はじめに これはGo Advent Calendar 2021の 6日目の記事です。 DDDについてはエリック・エヴァンス先生や先人の鬼ほどわかりやすい書籍があるので、 こちらを読むことをおすすめします。(笑) ドメイン駆動設計 モデリング/実装ガイド ドメイン駆動設計 サンプルコード&FAQ ドメイン駆動設計入門 ボトムアップでわかる!ドメイン駆動設計の基本 なのでここでは、DDDを詳しく解説などはせずに、 Golangを使ってモデルでドメイン知識をどのようにソフトウェアに落とし込むのか、 簡単な具体例をあげて説明していきます。 ドメイン駆動設計(DDD)とは? とはいっても、ドメイン駆動設計とはなんぞやをカンタンに説明しておきますね。 DDD Referenceでの定義を以下に記します。 Domain-Driven Design is an approach to the develo

                                                                            【DDD】Golangを使ってモデルでドメイン知識を表現してみた
                                                                          • 🔥 Battle for the Bundling time: esbuild — a JavaScript bundler and minifier written on Golang

                                                                            🔥 Battle for the Bundling time: esbuild — a JavaScript bundler and minifier written on Golang Introduction In this crazy world, it has become so difficult to secure leadership in at least one discipline. And now, a new battle has already begun: the speed of assembly of bundle — a measure to determine the best JavaScript bundler... Hello, friend! And let the battle begins! ✊ 📝 Table of contents B

                                                                              🔥 Battle for the Bundling time: esbuild — a JavaScript bundler and minifier written on Golang
                                                                            • I want off Mr. Golang's Wild Ride

                                                                              I want off Mr. Golang's Wild Ride My honeymoon with the Go language is extremely over. This article is going to have a different tone from what I've been posting the past year - it's a proper rant. And I always feel bad writing those, because, inevitably, it discusses things a lot of people have been working very hard on. In spite of that, here we are. Having invested thousands of hours into the l

                                                                                I want off Mr. Golang's Wild Ride
                                                                              • [Go] golang.org/x/time/rate でレイトリミット - Qiita

                                                                                レイトリミットを実装するために golang.org/x/time/rate を採用したものの、しばらく経ってから見返すとその仕様を完全に忘れていてショックだったので、こちらに記事として備忘録的に要点をまとめていきたいと思います。 トークンバケット golang.org/x/time/rate は「トークンバケット」というアルゴリズムを Go で実装したパッケージになります。 このパッケージは一見すると使い方が分かりづらいのですが、「トークンバケット」を理解すると合点がいくデザインとなっているので、まずはこちらを理解しましょう。 一応 Wikipedia にもページがあるのですが(トークンバケット - Wikipedia)、golang.org/x/time/rate パッケージのドキュメントを読むのが端的で分かりやすいと個人的には思いました。Limiter 構造体に対する説明として記載さ

                                                                                  [Go] golang.org/x/time/rate でレイトリミット - Qiita
                                                                                • GolangでDBアクセスがあるユニットテストのやり方を考える - Qiita

                                                                                  こんにちは、こちらはLinc'wellアドベントカレンダーの1日目です。 皆さんはDBに対して書き込みが発生する関数のテストをどのように行われているでしょうか? 私はgolang初心者どころかサーバサイド初心者なので、最適解が全くもって分からなかったのですが、いろいろ調べた末「こんな感じで用意すると良さそう」というテスト環境・書き方に落ち着いたのでそれをここに記します。 同じ悩みを持った方に判断基準を提供できるような記事になっていると嬉しいです。(あわよくば強い人からのフィードバック待ってます) はじめに: どんなテストを書きたいのか はじめに要件をクリアにするためにどんなテストを書きたいのかの具体例を書きます。 ただ今私はECサイトの開発をしていて、その中で定期購入の仕組みを作っています。 定期購入はユーザが定期購入を申し込んだ際に「次にどの日付にどんな商品を購入するのか」というデータを

                                                                                    GolangでDBアクセスがあるユニットテストのやり方を考える - Qiita