gt

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

package gt is for GOPATH testing for vendor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSpec

type FileSpec struct {
	Pkg     string
	PkgName string
	Name    string
	Imports []string
	Build   string
}

func File

func File(name string, imports ...string) FileSpec

func FileBuild

func FileBuild(name, build string, imports ...string) FileSpec

func FilePkgBuild added in v1.0.2

func FilePkgBuild(name, pkgName, build string, imports ...string) FileSpec

func (FileSpec) Bytes

func (fs FileSpec) Bytes() []byte

type GopathTest

type GopathTest struct {
	*testing.T
	// contains filtered or unexported fields
}

func New

func New(t *testing.T) *GopathTest

func (*GopathTest) Check

func (g *GopathTest) Check(err error)

Check is fatal to the test if err is not nil.

func (*GopathTest) Clean

func (g *GopathTest) Clean()

func (*GopathTest) Current

func (g *GopathTest) Current() string

Current working directory.

func (*GopathTest) Fatal

func (g *GopathTest) Fatal(args ...interface{})

func (*GopathTest) In

func (g *GopathTest) In(pkg string)

In sets the current directory as an import path.

func (*GopathTest) Path

func (g *GopathTest) Path(pkg string) string

Get path from package import path pkg.

func (*GopathTest) Remove

func (g *GopathTest) Remove(at string)

func (*GopathTest) Setup

func (g *GopathTest) Setup(at string, files ...FileSpec)

type HttpHandler

type HttpHandler struct {
	// contains filtered or unexported fields
}

func NewHttpHandler

func NewHttpHandler(g *GopathTest, vcsName string) *HttpHandler

func (*HttpHandler) Close

func (h *HttpHandler) Close() error

func (*HttpHandler) HttpAddr

func (h *HttpHandler) HttpAddr() string

func (*HttpHandler) ServeHTTP

func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) Setup

func (h *HttpHandler) Setup() VcsHandle

Setup returns type with Remove function that can be defer'ed.

type VcsHandle

type VcsHandle interface {
	Commit() (rev string, commitTime string)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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