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
package main import ( "fmt" "net/http" "github.com/mozillazg/go-httpheader" ) type Options struct { hide string ContentType string `header:"Content-Type"` Length int XArray []string `header:"X-Array"` TestHide string `header:"-"` IgnoreEmpty string `header:"X-Empty,omitempty"` IgnoreEmptyN string `header:"X-Empty-N,omitempty"` CustomHeader http.Header } func main() { opt := Options{ hide: "hide",
Mocking your SQL database in Go tests has never been easier. The copyist library automatically records low-level SQL calls made during your tests. It then generates recording files that can be used to play back those calls without connecting to the real SQL database. Run your tests again. This time, they'll run much faster, because now they do not require a database connection. Best of all, your t
Moq is an Interface mocking tool for go generate — github.com/matryer/moqIn my recent talk about Idiomatic Go Tricks I talked about a testing technique that David Hernandez showed me where you can test code that has dependencies (described by an interface) while keeping the mock code inside the test it belongs to. You write a struct full of function fields that mirror the interface, and matching m
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く