Documentation ¶
Overview ¶
Plugin for using Gock on Gentleman library.
GockPlugin ¶
This variable is a plugin of gentleman, could be fed into "Use(plugin.Plugin)" of "*gentleman.Client" or "*gentleman.Request" object.
Why ¶
Because https://github.com/h2non/gentleman-mock is still depending on "gentleman.v1" library, so we provide this package to make it support "gentleman.v2".
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GockPlugin = plugin.NewPhasePlugin("before dial", func(ctx *context.Context, h context.Handler) {
gock.InterceptClient(ctx.Client)
h.Next(ctx)
})
Supports Gock in gentleman framework.
gentleman.Client.Use(gock_plugin.GockPlugin)
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.