タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

golangに関するhokorobiのブックマーク (5)

  • Big Sky :: net/http でレスポンスの内容を確認したいなら io.TeeReader を使おう


    « Golang  path/filepath  path 使 | Main | VimConf2017  » printf 便退 printf   net/http  JSON  Go io.Reader  io.Writer使 package main import ( "encoding/json" "fmt" "log" "net/http" ) type Foo struct { ID  
    Big Sky :: net/http でレスポンスの内容を確認したいなら io.TeeReader を使おう
  • Your pprof is showing: IPv4 scans reveal exposed net/http/pprof endpoints:

    Golang’s net/http/pprof package is incredibly powerful: it’s trivial to debug a running production server. In the process it’s equally easy to accidentally expose your debugging information to the world. In this post we use the zmap project to show this is a real problem in the wild, and explain preventative measures you can take. Update: an earlier version suggested an exposed endpoint could leak

  • Go 言語の値レシーバとポインタレシーバ

    「レシーバ」とはGo 言語はある種のオブジェクト指向プログラミング (OOP) 言語であり、 OOP 言語の慣例通り、メソッドを呼び出される対象のことを「レシーバ」と呼びます。 ちなみになぜ「レシーバ」と呼ぶのかというと、昔の OOP 言語の文脈ではメソッド呼び出しのことを「メッセージの送信」と言い、メソッドを呼び出される側は「メッセージの受信側」だからです。 「値レシーバ」と「ポインタレシーバ」Go 言語では「値」と「ポインタ」が明示的に区別されているため、たとえばある構造体に対してメソッドを定義する場合でも、「値型」に対する定義なのか「ポインタ型」に対する定義なのかはっきりと区別しなければなりません。それぞれについて簡単に説明します。 値レシーバ「値型」に対してメソッド定義されたものが「値レシーバ」です。 Go 言語では構造体は値なので、以下の例では Person という値型に対して

  • SliceTricks

    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

    SliceTricks
  • Go言語のCLIツールのpanicをラップしてクラッシュレポートをつくる


    mitchellh/panicwrap Gopanicpanicrecover使panic panicGo使panicpanicmitchellh/panicw
  • 1