Most Recent How Your Business Can Benefit from an Environmental Policy Discover how an environmental policy can boost sustainability and enhance your organization’s reputation.
Awesome Go We use the Golang Bridge community Slack for instant communication, follow the form here to join. Sponsorships: Special thanks to Awesome Go has no monthly fee, but we have employees who work hard to keep it running. With money raised, we can repay the effort of each person involved! You can see how we calculate our billing and distribution as it is open to the entire community. Want to
2016年、普段から現場でGoを使っている名立たるGoプログラマの皆さんと一緒に「みんなのGo言語」という書籍を執筆させて頂きました。 「みんなのGo言語」は他のリファレンス本とは異なり、Go言語の最新事情をお伝えする事に主眼を置いて書きました。 インストール方法や使い方、モダンなテストの書き方、ツールの使い方等も執筆時点での最新情報を書かせて頂きました。 これはとても意義がある事だった感じています。 しかしこれは逆に、時間が経つにつれ執筆した内容が次第に古くなってしまうというリスクを伴います。幾つかの内容は、3年経った現在に合わなくなっている物も出てきました。紹介したツールの中には開発が止まってしまっている物もあれば、執筆時点で制限事項と記したけれども現在では解消している物も出てきています。そればかりではなく新しく追加されたコマンドや機能、新しい制限事項もあります。特に Go Modul
以下のサイトを参考にやってみました。 qiita.com Go は公式からインストール。 The Go Programming Language VS Code も公式からインストール。 azure.microsoft.com Go のインストールは c:\go にしました。インストール後環境変数を見ると GOPATH 環境変数が追加されていてユーザーディレクトリの下の go が設定されていました。 VS Code に Go の拡張機能を入れます。っていうかパブリッシャーがマイクロソフト!?知らんかった…。 少し前の Go の環境構築の記事を見る限り Microsoft ではないパブリッシャーのスクショとかが見受けられるので最近変わったんですかね? この段階で .go のファイルのあるフォルダを開いてファイルを適当に開くと以下のツールのインストールをするかという確認が出たので Instal
blog.okazuki.jp さて、引き続きやっていきます。A Tour of Go の Methods and interfaces からやっていきます。 メソッド 普通のオブジェクト指向言語にあるようなメソッドみたいに構造体やクラス内にメソッドを定義するというよりはレシーバーという特別な第一引数の値を受け取るような感じで関数を定義するとメソッドになるみたいです。 C# でいう拡張メソッドのイメージに近いなと感じました。あとは、C++ 言語の内部実装でメソッドの第一引数はクラスへのポインターだとかいうのを昔見た記憶があるので、それに近いなぁと思いました。 定義方法は func キーワードと関数名の間に括弧でくくってレシーバーを指定します。 package main import "fmt" type Person struct { Name string } func (p Perso
blog.okazuki.jp 引き続き A Tour of Go していきます。 ポインター Go 言語にはポインターがある。見初期化状態でも nil になる。 C 言語と同じで & でポインターを取得できて * でポインターの先の実態を見ることが出来る。 package main import ( "fmt" ) func main() { i := 0 var p *int = &i // p := &i でいいけどポインター型の変数の宣言の確認もかねて *p = 10 fmt.Printf("i = %v, *p = %v\n", i, *p) // i = 10, *p = 10 } Java 言語がポインターが無い!といいつつ実態はポインターみたいな参照があるよ!っていうのはポインターの無い言語というスタンスのためだったのかなぁとか勝手に思ってるけど Go は素直にポインターと
さて、先日 Go 言語の環境を整えたので早速やっていこうと思います。 blog.okazuki.jp とりあえず A Tour of Go を見ながら思ったことを書いていきます。実際に勉強しようと思う人は A Tour of Go を見ましょう。素晴らしい翻訳をしてくれた人たちに感謝ですね! プログラムのエントリーポイント プログラムのエントリーポイントは main パッケージの main 関数のようです。 実際に %GOHOME%\src\sample フォルダに main.go を新規作成して以下のような処理を書くと Hello world と表示されます。 package main import ( "fmt" ) func main() { fmt.Print("Hello world") } 実行結果 Hello world どうも Java と同じでファイル名の先頭で pack
国内版よりも安く、早く届く米国版の Surface Go まずは、なぜ国内版の登場を待たずに米国版の Surface Go を注文したのか? というと、理由は以下。 Office が付属していないので2万円近く安く手に入る 国内版よりも20日くらい早く届く それぞれ理由などを紹介しておきたい。 Office が付属していないので2万円近く安く手に入る まず、米国版を個人輸入したほうが、Office 抱き合わせの国内版よりも2万円近く安く手に入れることができるという点から、僕は米国版を注文した。 日本国内向けの 8GB RAM / 128GB SSD 搭載のモデルの価格は 8万2,800円。対して米国版は 549ドル(日本円で約6万2,000円)。送料やデポジット金などが発生するため、実際にアマゾンで購入する場合には約601ドル(日本円で約6万8,000円)となるが、デポジット金は送料などを
これは便利(確信 これから雨が降るのか、今降ってる雨がどれくらい長引くのか確認したい時がある。 かといってわざわざ雨雲でググるのも面倒なときはotiai10/ameshが最強 快晴でスクショが全く映えない (´・ω・`) ターミナルでameshを叩くだけで表示される。 インストール goが動かせる環境が必要 go get github.com/otiai10/amesh/amesh 公式ドキュメントに載ってるがDocker版も用意されてて草 実行 amesh おわり 元ネタ プログラマのみなさん、ameshコマンド、良いですよhttps://t.co/4hAsAiKwu8 pic.twitter.com/XYpIC4dffB— エロリツイート先生 (@otiai10) 2018年8月13日
今回は、Golangのgolang.org/x/crypto/sshパッケージを使って、SSHサーバを構築してみました。 かなりミニマムな実装ですが、リモートからSSH接続して、対話的にコマンドが実行できるところまで実装しました。 コード github.com package main import ( "golang.org/x/crypto/ssh" "log" "net" "io/ioutil" "fmt" "os/exec" "github.com/kr/pty" "sync" "io" ) func main() { serverConfig := &ssh.ServerConfig{ NoClientAuth: true, } privateKeyBytes, err := ioutil.ReadFile("id_rsa") if err != nil { log.Fatal(
「Surface Go」日本版は本当に高いのか Office付属は妥当なのか:鈴木淳也の「Windowsフロントライン」(1/2 ページ) ウワサの低価格Surfaceこと、「Surface Go」がついに登場した。しかし、日本モデルは米国モデルと一部仕様が異なり、それもあって最小構成価格が高めなことで、批判の声も少なくないようだ。今回はSurface Go日本モデルのこうした点について考察する。 「低価格Surface」のウワサは本当だった。米Microsoftが7月9日(現地時間)に、399ドルからの「Surface Go」を正式発表したのだ。筆者はもう少し後の発表になると予想していたが、夏の間に入手できるのだからうれしい誤算といえる。一方のスペックに関しては、Pentium GoldプロセッサやUSB Type-Cポートを搭載するなど、事前のリーク情報通りだった部分も多い。
How to watch Polaris Dawn astronauts attempt the first commercial spacewalk
How to watch Polaris Dawn astronauts attempt the first commercial spacewalk
高速な静的サイトジェネレータ Hugo の使い方です。 Go 言語に関する記事はこちらへ分離しました。 はじめにHugo とは/Hugo をインストールするHugo で新規の Web サイトを作成する記事の作成Hugo で記事を作成するHugo でドラフトページを作成するHugo でドラフトページの一覧を簡単に確認できるようにするHugo のテーマを設定するHugo で独自のテーマを作成するHugo Themes(Hugo テーマの一覧サイト)hugo コマンドと設定ファイルhugo コマンドカレントディレクトリを気にせずに hugo コマンドを実行する (hugo server -s)ポート番号を指定して Hugo サーバーを起動する (hugo server -p)Hugo サーバーで記事生成のキャッシュを無効にする (hugo server --ignoreCache)複数の Hug
近年、新興言語とは思えない簡潔さや実行時パフォーマンスの良さなどからGoが注目を集めています。サイバーエージェントのメディアディベロップメント事業本部でもGoの導入を進めており、Goアプリケーションの開発を通じてその利点や欠点などを身を持って学ぶことができました。この記事では、Goアプリケーションの自動化単体テストを行うにあたって、テストの実施を容易にするにはどのような設計を行うべきかを、依存性の分離という観点から紹介します。依存性の分離は、単体テストにおいて確保しなければならない要素の一つです。依存性の分離を行うことによって、一つのテストで実行される本番コードの範囲を制限することができ、テストが失敗したときの原因究明が容易になります。また、テストの再現性の担保も容易になります。 はじめに 初めまして。株式会社サイバーエージェント ソフトウェアエンジニアの大澤翔吾と申します。私の所属してい
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く