gock_plugin

package
v0.0.0-...-5416f79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2017 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL