sample

package
v0.0.0-...-cf2c34e Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// T1 comment 11
	T1 = testdata.T1 // line suffix comment 1
	// T2 comment 22
	T2 = testdata.T2
	T3 = testdata.T3 // T3 line suffix comment 1
)

Variables

This section is empty.

Functions

func ConfigOptionDeclareWithDefault

func ConfigOptionDeclareWithDefault() interface{}

func InstallConfigOptionsWatchDog

func InstallConfigOptionsWatchDog(dog func(cc *ConfigOptions))

InstallConfigOptionsWatchDog install watch dog

func InstallSpecOptionsWatchDog

func InstallSpecOptionsWatchDog(dog func(cc *SpecOptions))

InstallSpecOptionsWatchDog install watch dog

func SpecOptionDeclareWithDefault

func SpecOptionDeclareWithDefault() interface{}

Types

type ConfigOption

type ConfigOption func(cc *ConfigOptions) ConfigOption

ConfigOption option define

func WithFood

func WithFood(v *string) ConfigOption

Food Doc

func WithTestBool

func WithTestBool(v bool) ConfigOption

func WithTestInt

func WithTestInt(v int) ConfigOption

这里是函数注释1 这里是函数注释2

func WithTestInt64

func WithTestInt64(v int64) ConfigOption

func WithTestMapIntInt

func WithTestMapIntInt(v map[int]int) ConfigOption

func WithTestMapIntString

func WithTestMapIntString(v map[int]string) ConfigOption

func WithTestMapStringInt

func WithTestMapStringInt(v map[string]int) ConfigOption

func WithTestMapStringString

func WithTestMapStringString(v map[string]string) ConfigOption

MapStringString Doc

func WithTestNil

func WithTestNil(v interface{}) ConfigOption

test comment 1 test comment 2

func WithTestNilFunc

func WithTestNilFunc(v func()) ConfigOption

TestNilFunc

func WithTestSliceBool

func WithTestSliceBool(v ...bool) ConfigOption

func WithTestSliceByte

func WithTestSliceByte(v []byte) ConfigOption

func WithTestSliceInt

func WithTestSliceInt(v ...int) ConfigOption

func WithTestSliceInt64

func WithTestSliceInt64(v ...int64) ConfigOption

func WithTestSliceIntEmpty

func WithTestSliceIntEmpty(v ...int) ConfigOption

SliceInt Doc

func WithTestSliceIntNil

func WithTestSliceIntNil(v ...int) ConfigOption

func WithTestSliceString

func WithTestSliceString(v ...string) ConfigOption

func WithTestString

func WithTestString(v string) ConfigOption

func WithWalk

func WithWalk(v func()) ConfigOption

Walk Doc

type ConfigOptions

type ConfigOptions struct {
	// test comment 1
	// test comment 2
	TestNil  interface{} // test comment 3
	TestBool bool        // test comment 4
	// 这里是函数注释1
	// 这里是函数注释2
	TestInt         int      // default 32
	TestInt64       int64    // int64 line
	TestSliceInt    []int    // slice int
	TestSliceInt64  []int64  // slice int64 line
	TestSliceString []string // slice string
	TestSliceBool   []bool   // slice bool line comment
	TestSliceIntNil []int    // TestSliceIntNil line comment
	TestSliceByte   []byte   // TestSliceByte line comment
	// SliceInt Doc
	TestSliceIntEmpty []int
	TestMapIntInt     map[int]int    // TestMapIntInt line comment
	TestMapIntString  map[int]string // TestMapIntString line comment
	TestMapStringInt  map[string]int // TestMapStringInt line comment
	// MapStringString Doc
	TestMapStringString map[string]string // MapStringString Line Comment
	TestString          string
	// Food Doc
	Food (*string) // Food Line Comment
	// Walk Doc
	Walk func() // Walk Line Comment
	// TestNilFunc
	TestNilFunc (func()) // 中文1
	// TestReserved1_
	TestReserved1 []byte // 在调优或者运行阶段,我们可能需要动态查看连接池中的一些指标,
	// 来判断设置的值是否合理,或者检测连接池是否有异常情况出现
	TestReserved2 int // TestReserved2Inner after
}

Google Public DNS provides two distinct DoH APIs at these endpoints Using the GET method can reduce latency, as it is cached more effectively. RFC 8484 GET requests must have a ?dns= query parameter with a Base64Url encoded DNS message. The GET method is the only method supported for the JSON API.

func NewConfigOptions

func NewConfigOptions(opts ...ConfigOption) *ConfigOptions

NewConfigOptions create options instance.

func (*ConfigOptions) ApplyOption

func (cc *ConfigOptions) ApplyOption(opts ...ConfigOption)

ApplyOption modify options

func (*ConfigOptions) GetSetOption

func (cc *ConfigOptions) GetSetOption(opt ConfigOption) ConfigOption

GetSetOption modify and get last option

func (*ConfigOptions) SetOption

func (cc *ConfigOptions) SetOption(opt ConfigOption)

SetOption modify options

type MFuncTest

type MFuncTest struct {
	//dd TestInt
	*MTest
	//v2 int32
	*gen.Generator
	MInterface
}

MFuncTest CCCC XX X X X X

func (*MFuncTest) MX

func (m *MFuncTest) MX(v1 MTest, v2 *MTest, v3 []*MTest, v4 map[int]*MTest, v5 map[int][]*MTest,
	v6 map[int]map[int]*MTest, v7 chan *MTest, v8 chan MTest)

type MInterface

type MInterface interface {
	Value() (int, error)
}

type MTest

type MTest struct {
}

func (MTest) TestF1

func (m MTest) TestF1(int32, int32) (string, error)

func (MTest) TestF2

func (m MTest) TestF2(v1 int32, f1 int32) (string, error)

type SpecOption

type SpecOption func(cc *SpecOptions) SpecOption

SpecOption option define

func AppendSpecOptionsSliceOpt

func AppendSpecOptionsSliceOpt(v ...int32) SpecOption

func WithSpecOptionsSliceOpt

func WithSpecOptionsSliceOpt(v ...int32) SpecOption

Test Append Func

func WithSpecOptionsTestBool1

func WithSpecOptionsTestBool1(v bool) SpecOption

func WithSpecOptionsTestInt1

func WithSpecOptionsTestInt1(v int) SpecOption

这里是函数注释3 这里是函数注释4

func WithSpecOptionsTestNil1

func WithSpecOptionsTestNil1(v interface{}) SpecOption

test comment 5 test comment 6

func WithSpecOptionsTestNilFunc1

func WithSpecOptionsTestNilFunc1(v func()) SpecOption

func WithSpecOptionsTestReserved2Inner1

func WithSpecOptionsTestReserved2Inner1(v int) SpecOption

sql.DB对外暴露出了其运行时的状态db.DBStats,sql.DB在关闭,创建,释放连接时候,会维护更新这个状态。 我们可以通过prometheus来收集连接池状态,然后在grafana面板上配置指标,使指标可以动态的展示。

type SpecOptions

type SpecOptions struct {
	// test comment 5
	// test comment 6
	TestNil1  interface{} // test comment 1
	TestBool1 bool        // test comment 2
	// 这里是函数注释3
	// 这里是函数注释4
	TestInt1      int
	TestNilFunc1  (func()) // 中文2
	TestReserved2 []byte
	// sql.DB对外暴露出了其运行时的状态db.DBStats,sql.DB在关闭,创建,释放连接时候,会维护更新这个状态。
	// 我们可以通过prometheus来收集连接池状态,然后在grafana面板上配置指标,使指标可以动态的展示。
	TestReserved2Inner1 int
	// Test Append Func
	SliceOpt []int32
}

HTTP parsing and communication with DNS resolver was successful, and the response body content is a DNS response in either binary or JSON encoding, depending on the query endpoint, Accept header and GET parameters.

func NewSpecOptions

func NewSpecOptions(opts ...SpecOption) *SpecOptions

NewSpecOptions create options instance.

func (*SpecOptions) ApplyOption

func (cc *SpecOptions) ApplyOption(opts ...SpecOption)

ApplyOption modify options

func (*SpecOptions) GetSetOption

func (cc *SpecOptions) GetSetOption(opt SpecOption) SpecOption

GetSetOption modify and get last option

func (*SpecOptions) SetOption

func (cc *SpecOptions) SetOption(opt SpecOption)

SetOption modify options

type TestInt

type TestInt int32

type TestString

type TestString = testdata.TestString //  comment for test string 2

TestString comment for test string 1

type TestType

type TestType = testdata.TestType //  comment 2

TestType test type comment 1 second line comment

Jump to

Keyboard shortcuts

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