fixtures

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fixtures contains made-up go files used for testing golines under various conditions.

Package fixtures contains made-up go files used for testing golines under various conditions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaseLists

func CaseLists()

func ChainedCalls

func ChainedCalls()

func DeferStmt

func DeferStmt()

func TestGoroutines

func TestGoroutines()

func TestLongStructFields

func TestLongStructFields()

func TestLoops

func TestLoops()

Types

type Chain

type Chain struct{}

func NewChain added in v0.3.0

func NewChain() *Chain

func (*Chain) ChainCall

func (c *Chain) ChainCall(arg1 string, arg2 string, arg3 string) *Chain

type MyEmptyInterface

type MyEmptyInterface interface{}

type MyInterface

type MyInterface interface {
	// contains filtered or unexported methods
}

type MyInterface2

type MyInterface2 interface {
	// contains filtered or unexported methods
}

type MyStruct

type MyStruct struct {
	Field1 string `json:"field1" info:"something"`

	ALongField2 string `json:"long_field2" info:"something else"`
	Field3      string `json:"field3"      info:"third thing"`
}

type MyStruct2

type MyStruct2 struct {
	Field1 string

	ALongField2 string
	Field3      string            `json:"field3"         info:"here"`
	Field5      map[string]string `json:"something else"`
	MyStruct    `                  json:"mystruct tag"               info2:"here"`
}

type Struct10

type Struct10 struct {
	Field1   func(int, int) string `json:"field" info:"value"`
	Field2   string                `             info:"value2"`
	MyStruct `json:"field" info:"value3"`
}

Width of function types isn't supported, so MyStruct tags will not be aligned

type Struct4

type Struct4 struct {
	Field1   []int `json:"field"`
	MyStruct `      json:"field"`
}

type Struct5

type Struct5 struct {
	Field1   *int `json:"field"`
	MyStruct `     json:"field"`
}

type Struct6

type Struct6 struct {
	Field1   chan<- int `json:"field"`
	MyStruct `           json:"field"`
}

type Struct7

type Struct7 struct {
	Field1   <-chan int `json:"field"`
	Field2   string     `json:"field"`
	MyStruct `           json:"field"`
}

type Struct8

type Struct8 struct {
	Field1   chan int `json:"field"`
	MyStruct `         json:"field"`
}

type Struct9

type Struct9 struct {
	Field0   int      `json:"field"`
	Field1   MyStruct `json:"field"`
	MyStruct `         json:"field"`
	Field2   string `json:"field"`
}

Formatting of tags after embedded field isn't handled perfectly

Jump to

Keyboard shortcuts

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