Skip to content

Latest commit

 

History

History
182 lines (144 loc) · 4.3 KB

README.md

File metadata and controls

182 lines (144 loc) · 4.3 KB

README

This document was generated by Gadget by providing a valid Go template. You can generate this document yourself by running the following in the /sink directory:

$ gadget --format template --template README.tpl

Or, without the --template ... flag as it will use README.tpl as the default template:

$ gadget --format template

Enjoy!

Package sink_test

File benchmarks_test.go

Function BenchmarkKitchenSink

  • func BenchmarkKitchenSink(b *testing.B) #
  • benchmarks_test.go:8:12 #
for i := 0; i < b.N; i++ {
	fmt.Println("intentionally not implemented")
}

File examples_test.go

Function ExampleNewNormalStructTest

  • func ExampleNewNormalStructTest() #
  • examples_test.go:9:16 #
s := sink.NewNormalStructTest("Wilhelm", "Murdoch", 40)

fmt.Println(s.First, s.Last)

File sink_test.go

Function TestKitchenSink

  • func TestKitchenSink(t *testing.T) #
  • sink_test.go:9:11 #
assert.True(t, true, true)

Package sink

File sink.go

Function PrintVars

  • func PrintVars() #
  • sink.go:30:34 #

PrintVars prints out a value on each line.

fmt.Println(one)
fmt.Println(two)
fmt.Println(three)

Function AssignCollection

  • func AssignCollection() #
  • sink.go:37:43 #

AssignCollection assigns values to var collection.

collection = make(map[string]map[string]string)

collection["one"] = map[string]string{"foo": "bar"}
collection["two"] = map[string]string{"merp": "flakes"}

Function PrintConst

  • func PrintConst() #
  • sink.go:46:50 #

PrintConst prints out a value on each line.

fmt.Println(ONE)
fmt.Println(TWO)
fmt.Println(THREE)

Function NewNormalStructTest

  • func NewNormalStructTest(first, last string, age int) *NormalStructTest #
  • sink.go:72:79 #

NewNormalStructTest returns a new instance of NormalStructTest.

return &NormalStructTest{
	First:              first,
	Last:               last,
	Age:                age,
	EmbeddedStructTest: &EmbeddedStructTest{"SWE"},
}

Function GetPrivate

  • func (nst *NormalStructTest) GetPrivate() string #
  • sink.go:82:84 #

GetPrivate is an accessor method that returns a dark secret.

return nst.private

Function GetOccupation

  • func (nst *NormalStructTest) GetOccupation() string #
  • sink.go:87:89 #

GetOccupation is an accessor method that returns an occupation.

return nst.Occupation

Function GetFullName

  • func (nst NormalStructTest) GetFullName() string #
  • sink.go:92:94 #

GetFullName is an function that attempts to return a full name.

return fmt.Sprint(nst.First, nst.Last)

Function notExported

  • func (nst NormalStructTest) notExported() string #
  • sink.go:98:100 #

notExported is an example of a function that will not be exported.

return "I should not be exported!"

Function NewGenericStructTest

  • func NewGenericStructTest[T any](first, last string, age int) *GenericStructTest[T] #
  • sink.go:111:113 #

NewGenericStructTest returns a new instance of GenericStructTest.

return &GenericStructTest[T]{first, last, age, "hidden"}

Function GetPrivate

  • func (nst *GenericStructTest[T]) GetPrivate() string #
  • sink.go:116:118 #

GetPrivate is an accessor method that returns a dark secret.

return nst.private

Function GetFullName

  • func (nst GenericStructTest[T]) GetFullName() string #
  • sink.go:121:123 #

GetFullName is an function that attempts to return a full name.

return fmt.Sprint(nst.First, nst.Last)

Function IsBlank

  • func (nst GenericStructTest[T]) IsBlank() { #
  • sink.go:126:126 #

IsBlank is an function that does not have a body.