SYMBOL INDEX (712 symbols across 155 files) FILE: site/assets/javascripts/lunr/tinyseg.js function TinySegmenter (line 33) | function TinySegmenter() { FILE: site/assets/javascripts/lunr/wordcut.js function s (line 1) | function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&re... function isMatch (line 421) | function isMatch(pat, offset, ch) { function replacer (line 704) | function replacer(key, value) { function truncate (line 717) | function truncate(s, n) { function getMessage (line 725) | function getMessage(self) { function fail (line 742) | function fail(actual, expected, message, operator, stackStartFunction) { function ok (line 762) | function ok(value, message) { function _deepEqual (line 793) | function _deepEqual(actual, expected) { function isArguments (line 838) | function isArguments(object) { function objEquiv (line 842) | function objEquiv(a, b) { function expectedException (line 911) | function expectedException(actual, expected) { function _throws (line 927) | function _throws(shouldThrow, block, expected, message) { function balanced (line 983) | function balanced(a, b, str) { function maybeMatch (line 998) | function maybeMatch(reg, str) { function range (line 1004) | function range(a, b, str) { function numeric (line 1053) | function numeric(str) { function escapeBraces (line 1059) | function escapeBraces(str) { function unescapeBraces (line 1067) | function unescapeBraces(str) { function parseCommaParts (line 1079) | function parseCommaParts(str) { function expandTop (line 1106) | function expandTop(str) { function identity (line 1123) | function identity(e) { function embrace (line 1127) | function embrace(str) { function isPadded (line 1130) | function isPadded(el) { function lte (line 1134) | function lte(i, y) { function gte (line 1137) | function gte(i, y) { function expand (line 1141) | function expand(str, isTop) { function EventEmitter (line 1283) | function EventEmitter() { function g (line 1425) | function g() { function isFunction (line 1548) | function isFunction(arg) { function isNumber (line 1552) | function isNumber(arg) { function isObject (line 1556) | function isObject(arg) { function isUndefined (line 1560) | function isUndefined(arg) { function ownProp (line 1576) | function ownProp (obj, field) { function alphasorti (line 1585) | function alphasorti (a, b) { function alphasort (line 1589) | function alphasort (a, b) { function setupIgnores (line 1593) | function setupIgnores (self, options) { function ignoreMap (line 1604) | function ignoreMap (pattern) { function setopts (line 1617) | function setopts (self, pattern, options) { function deprecationWarning (line 1684) | function deprecationWarning(options) { function finish (line 1700) | function finish (self) { function mark (line 1753) | function mark (self, p) { function makeAbs (line 1777) | function makeAbs (self, f) { function isIgnored (line 1794) | function isIgnored (self, path) { function childrenIgnored (line 1803) | function childrenIgnored (self, path) { function glob (line 1878) | function glob (pattern, options, cb) { function Glob (line 1916) | function Glob (pattern, options, cb) { function next (line 2003) | function next () { function lstatcb_ (line 2294) | function lstatcb_ (er, lstat) { function readdirCb (line 2336) | function readdirCb (self, abs, cb) { function lstatcb_ (line 2531) | function lstatcb_ (er, lstat) { function globSync (line 2589) | function globSync (pattern, options) { function GlobSync (line 2597) | function GlobSync (pattern, options) { function inflight (line 3041) | function inflight (key, cb) { function makeres (line 3051) | function makeres (key) { function slice (line 3082) | function slice (args) { function charSet (line 3156) | function charSet (s) { function filter (line 3167) | function filter (pattern, options) { function ext (line 3174) | function ext (a, b) { function minimatch (line 3208) | function minimatch (p, pattern, options) { function Minimatch (line 3226) | function Minimatch (pattern, options) { function make (line 3258) | function make () { function parseNegate (line 3314) | function parseNegate () { function braceExpand (line 3349) | function braceExpand (pattern, options) { function parse (line 3387) | function parse (pattern, isSub) { function makeRe (line 3758) | function makeRe () { function match (line 3816) | function match (f, partial) { function globUnescape (line 4033) | function globUnescape (s) { function regExpEscape (line 4037) | function regExpEscape (s) { function once (line 4062) | function once (fn) { function onceStrict (line 4072) | function onceStrict (fn) { function normalizeArray (line 4112) | function normalizeArray(parts, allowAboveRoot) { function trim (line 4221) | function trim(arr) { function filter (line 4294) | function filter (xs, f) { function posix (line 4317) | function posix(path) { function win32 (line 4321) | function win32(path) { function defaultSetTimout (line 4349) | function defaultSetTimout() { function defaultClearTimeout (line 4352) | function defaultClearTimeout () { function runTimeout (line 4375) | function runTimeout(fun) { function runClearTimeout (line 4400) | function runClearTimeout(marker) { function cleanUpNextTick (line 4432) | function cleanUpNextTick() { function drainQueue (line 4447) | function drainQueue() { function Item (line 4485) | function Item(fun, array) { function noop (line 4499) | function noop() {} function createReduce (line 4701) | function createReduce(dir) { function createPredicateIndexFinder (line 5137) | function createPredicateIndexFinder(dir) { function createIndexFinder (line 5167) | function createIndexFinder(dir, predicateFind, sortedIndex) { function collectNonEnumProps (line 5432) | function collectNonEnumProps(obj, keys) { function deprecated (line 6161) | function deprecated() { function inspect (line 6208) | function inspect(obj, opts) { function stylizeWithColor (line 6266) | function stylizeWithColor(str, styleType) { function stylizeNoColor (line 6278) | function stylizeNoColor(str, styleType) { function arrayToHash (line 6283) | function arrayToHash(array) { function formatValue (line 6294) | function formatValue(ctx, value, recurseTimes) { function formatPrimitive (line 6407) | function formatPrimitive(ctx, value) { function formatError (line 6426) | function formatError(value) { function formatArray (line 6431) | function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { function formatProperty (line 6451) | function formatProperty(ctx, value, recurseTimes, visibleKeys, key, arra... function reduceToSingleString (line 6510) | function reduceToSingleString(output, base, braces) { function isArray (line 6533) | function isArray(ar) { function isBoolean (line 6538) | function isBoolean(arg) { function isNull (line 6543) | function isNull(arg) { function isNullOrUndefined (line 6548) | function isNullOrUndefined(arg) { function isNumber (line 6553) | function isNumber(arg) { function isString (line 6558) | function isString(arg) { function isSymbol (line 6563) | function isSymbol(arg) { function isUndefined (line 6568) | function isUndefined(arg) { function isRegExp (line 6573) | function isRegExp(re) { function isObject (line 6578) | function isObject(arg) { function isDate (line 6583) | function isDate(d) { function isError (line 6588) | function isError(e) { function isFunction (line 6594) | function isFunction(arg) { function isPrimitive (line 6599) | function isPrimitive(arg) { function objectToString (line 6611) | function objectToString(o) { function pad (line 6616) | function pad(n) { function timestamp (line 6625) | function timestamp() { function hasOwnProperty (line 6667) | function hasOwnProperty(obj, prop) { function wrappy (line 6679) | function wrappy (fn, cb) { FILE: src/02-code-project-organization/1-variable-shadowing/main.go function main (line 8) | func main() { function listing1 (line 15) | func listing1() error { function listing2 (line 35) | func listing2() error { function listing3 (line 55) | func listing3() error { function listing4 (line 74) | func listing4() error { function createClientWithTracing (line 92) | func createClientWithTracing() (*http.Client, error) { function createDefaultClient (line 96) | func createDefaultClient() (*http.Client, error) { FILE: src/02-code-project-organization/10-type-embedding/main.go type Foo (line 9) | type Foo struct type Bar (line 13) | type Bar struct function fooBar (line 17) | func fooBar() { type InMem (line 22) | type InMem struct method Get (line 31) | func (i *InMem) Get(key string) (int, bool) { function New (line 27) | func New() *InMem { type Logger (line 38) | type Logger struct method Write (line 42) | func (l Logger) Write(p []byte) (int, error) { method Close (line 46) | func (l Logger) Close() error { function main (line 50) | func main() { FILE: src/02-code-project-organization/11-functional-options/builder/main.go constant defaultHTTPPort (line 8) | defaultHTTPPort = 8080 type Config (line 10) | type Config struct type ConfigBuilder (line 14) | type ConfigBuilder struct method Port (line 18) | func (b *ConfigBuilder) Port(port int) *ConfigBuilder { method Build (line 23) | func (b *ConfigBuilder) Build() (Config, error) { function NewServer (line 41) | func NewServer(addr string, config Config) (*http.Server, error) { function client (line 45) | func client() error { function randomPort (line 62) | func randomPort() int { FILE: src/02-code-project-organization/11-functional-options/config-struct/main.go type Config (line 3) | type Config struct function NewServer (line 7) | func NewServer(addr string, cfg Config) { function main (line 10) | func main() { FILE: src/02-code-project-organization/11-functional-options/functional-options/main.go constant defaultHTTPPort (line 8) | defaultHTTPPort = 8080 type options (line 10) | type options struct type Option (line 14) | type Option function WithPort (line 16) | func WithPort(port int) Option { function NewServer (line 26) | func NewServer(addr string, opts ...Option) (*http.Server, error) { function client (line 52) | func client() { function randomPort (line 56) | func randomPort() int { FILE: src/02-code-project-organization/13-utility-packages/stringset.go type Set (line 3) | type Set method Sort (line 7) | func (s Set) Sort() []string { return nil } function New (line 5) | func New(...string) Set { return nil } FILE: src/02-code-project-organization/2-nested-code/main.go function join1 (line 5) | func join1(s1, s2 string, max int) (string, error) { function join2 (line 26) | func join2(s1, s2 string, max int) (string, error) { function concatenate (line 43) | func concatenate(s1, s2 string) (string, error) { FILE: src/02-code-project-organization/3-init-functions/db/main.go function init (line 11) | func init() { function createClient (line 24) | func createClient(dataSourceName string) (*sql.DB, error) { FILE: src/02-code-project-organization/3-init-functions/main/main.go function init (line 9) | func init() { function init (line 13) | func init() { function main (line 17) | func main() { FILE: src/02-code-project-organization/3-init-functions/redis/redis.go function init (line 5) | func init() { function Store (line 9) | func Store(key, value string) error { FILE: src/02-code-project-organization/5-interface-pollution/copy/main.go function copySourceToDest (line 5) | func copySourceToDest(source io.Reader, dest io.Writer) error { FILE: src/02-code-project-organization/5-interface-pollution/copy/main_test.go function TestCopySourceToDest (line 9) | func TestCopySourceToDest(t *testing.T) { FILE: src/02-code-project-organization/5-interface-pollution/decoupling/with.go type customerStorer (line 3) | type customerStorer interface type CustomerService2 (line 7) | type CustomerService2 struct method CreateNewCustomer (line 11) | func (cs CustomerService2) CreateNewCustomer(id string) error { FILE: src/02-code-project-organization/5-interface-pollution/decoupling/without.go type CustomerService (line 3) | type CustomerService struct method CreateNewCustomer (line 7) | func (cs CustomerService) CreateNewCustomer(id string) error { type Customer (line 12) | type Customer struct type Store (line 16) | type Store struct method StoreCustomer (line 18) | func (s Store) StoreCustomer(customer Customer) error { FILE: src/02-code-project-organization/5-interface-pollution/restricting-behavior/main.go type IntConfig (line 3) | type IntConfig struct method Get (line 7) | func (c *IntConfig) Get() int { method Set (line 11) | func (c *IntConfig) Set(value int) { type intConfigGetter (line 15) | type intConfigGetter interface type Foo (line 19) | type Foo struct method Bar (line 27) | func (f Foo) Bar() { function NewFoo (line 23) | func NewFoo(threshold intConfigGetter) Foo { function main (line 32) | func main() { FILE: src/02-code-project-organization/6-interface-producer/client/client.go type customersGetter (line 5) | type customersGetter interface FILE: src/02-code-project-organization/6-interface-producer/store/store.go type CustomerStorage (line 3) | type CustomerStorage interface type Customer (line 12) | type Customer struct FILE: src/02-code-project-organization/8-any/main.go function main (line 3) | func main() { function f (line 18) | func f() {} FILE: src/02-code-project-organization/8-any/store/after.go method GetContract (line 3) | func (s *Store) GetContract(id string) (Contract, error) { method SetContract (line 7) | func (s *Store) SetContract(id string, contract Contract) error { method GetCustomer (line 11) | func (s *Store) GetCustomer(id string) (Customer, error) { method SetCustomer (line 15) | func (s *Store) SetCustomer(id string, customer Customer) error { FILE: src/02-code-project-organization/8-any/store/before.go type Customer (line 3) | type Customer struct type Contract (line 7) | type Contract struct type Store (line 11) | type Store struct method Get (line 13) | func (s *Store) Get(id string) (any, error) { method Set (line 17) | func (s *Store) Set(id string, v any) error { FILE: src/02-code-project-organization/9-generics/main.go function getKeys (line 8) | func getKeys(m any) ([]any, error) { function getKeysGenerics (line 25) | func getKeysGenerics[K comparable, V any](m map[K]V) []K { type customConstraint (line 33) | type customConstraint interface function getKeysWithConstraint (line 37) | func getKeysWithConstraint[K customConstraint, V any](m map[K]V) []K { type Node (line 41) | type Node struct method Add (line 46) | func (n *Node[T]) Add(next *Node[T]) { type SliceFn (line 50) | type SliceFn struct method Len (line 55) | func (s SliceFn[T]) Len() int { return len(s.S) } method Less (line 56) | func (s SliceFn[T]) Less(i, j int) bool { return s.Compare(s.S[i], s.S[j... method Swap (line 57) | func (s SliceFn[T]) Swap(i, j int) { s.S[i], s.S[j] = s.S[j], s.S[i] } function main (line 59) | func main() { FILE: src/03-data-types/17-octal-literals/main.go function main (line 5) | func main() { FILE: src/03-data-types/18-integer-overflows/main.go function Inc32 (line 5) | func Inc32(counter int32) int32 { function IncInt (line 12) | func IncInt(counter int) int { function IncUint (line 19) | func IncUint(counter uint) uint { function AddInt (line 26) | func AddInt(a, b int) int { function MultiplyInt (line 34) | func MultiplyInt(a, b int) int { FILE: src/03-data-types/19-floating-points/main.go function main (line 5) | func main() { function f1 (line 16) | func f1(n int) float64 { function f2 (line 24) | func f2(n int) float64 { FILE: src/03-data-types/20-slice-length-cap/main.go function main (line 5) | func main() { function print (line 34) | func print(s []int) { FILE: src/03-data-types/21-slice-init/main.go function convertEmptySlice (line 3) | func convertEmptySlice(foos []Foo) []Bar { function convertGivenCapacity (line 12) | func convertGivenCapacity(foos []Foo) []Bar { function convertGivenLength (line 22) | func convertGivenLength(foos []Foo) []Bar { type Foo (line 32) | type Foo struct type Bar (line 34) | type Bar struct function fooToBar (line 36) | func fooToBar(foo Foo) Bar { FILE: src/03-data-types/21-slice-init/main_test.go constant n (line 5) | n = 1_000_000 function BenchmarkConvert_EmptySlice (line 9) | func BenchmarkConvert_EmptySlice(b *testing.B) { function BenchmarkConvert_GivenCapacity (line 19) | func BenchmarkConvert_GivenCapacity(b *testing.B) { function BenchmarkConvert_GivenLength (line 29) | func BenchmarkConvert_GivenLength(b *testing.B) { FILE: src/03-data-types/22-nil-empty-slice/json/main.go function main (line 8) | func main() { type customer (line 26) | type customer struct FILE: src/03-data-types/22-nil-empty-slice/slice-init/main.go function main (line 7) | func main() { function log (line 21) | func log(i int, s []string) { FILE: src/03-data-types/23-checking-slice-empty/main.go function handleOperations1 (line 3) | func handleOperations1(id string) { function handleOperations2 (line 10) | func handleOperations2(id string) { function getOperations (line 17) | func getOperations(id string) []float32 { function handle (line 29) | func handle(operations []float32) {} FILE: src/03-data-types/24-slice-copy/main.go function bad (line 5) | func bad() { function correct (line 15) | func correct() { function main (line 25) | func main() { FILE: src/03-data-types/25-slice-append/main.go function main (line 5) | func main() { function listing1 (line 11) | func listing1() { function listing2 (line 18) | func listing2() { function listing3 (line 28) | func listing3() { function f (line 34) | func f(s []int) { FILE: src/03-data-types/26-slice-memory-leak/capacity-leak/main.go function consumeMessages (line 8) | func consumeMessages() { function getMessageType (line 16) | func getMessageType(msg []byte) []byte { function getMessageTypeWithCopy (line 20) | func getMessageTypeWithCopy(msg []byte) []byte { function receiveMessage (line 26) | func receiveMessage() []byte { function storeMessageType (line 30) | func storeMessageType([]byte) {} function printAlloc (line 32) | func printAlloc() { FILE: src/03-data-types/26-slice-memory-leak/slice-pointers/main.go type Foo (line 8) | type Foo struct function main (line 12) | func main() { function keepFirstTwoElementsOnly (line 29) | func keepFirstTwoElementsOnly(foos []Foo) []Foo { function keepFirstTwoElementsOnlyCopy (line 33) | func keepFirstTwoElementsOnlyCopy(foos []Foo) []Foo { function keepFirstTwoElementsOnlyMarkNil (line 39) | func keepFirstTwoElementsOnlyMarkNil(foos []Foo) []Foo { function printAlloc (line 46) | func printAlloc() { FILE: src/03-data-types/27-map-init/main_test.go constant n (line 5) | n = 1_000_000 function BenchmarkMapWithoutSize (line 9) | func BenchmarkMapWithoutSize(b *testing.B) { function BenchmarkMapWithSize (line 20) | func BenchmarkMapWithSize(b *testing.B) { FILE: src/03-data-types/28-map-memory-leak/main.go function main (line 8) | func main() { function randBytes (line 31) | func randBytes() [128]byte { function printAlloc (line 35) | func printAlloc() { FILE: src/03-data-types/29-comparing-values/main.go type customer1 (line 8) | type customer1 struct type customer2 (line 12) | type customer2 struct method equal (line 42) | func (a customer2) equal(b customer2) bool { function main (line 17) | func main() { FILE: src/04-control-structures/30-range-loop-element-copied/concepts/main.go function main (line 5) | func main() { FILE: src/04-control-structures/30-range-loop-element-copied/value-copy/main.go type account (line 8) | type account struct function main (line 12) | func main() { function createAccounts (line 38) | func createAccounts() []account { function createAccountsPtr (line 46) | func createAccountsPtr() []*account { function printAccountsPtr (line 54) | func printAccountsPtr(accounts []*account) { FILE: src/04-control-structures/31-range-loop-arg-evaluation/arrays/main.go function listing1 (line 5) | func listing1() { function listing2 (line 15) | func listing2() { function listing3 (line 25) | func listing3() { FILE: src/04-control-structures/31-range-loop-arg-evaluation/channels/main.go function main (line 5) | func main() { FILE: src/04-control-structures/31-range-loop-arg-evaluation/concepts/main.go function main (line 3) | func main() { FILE: src/04-control-structures/32-range-loop-pointers/concepts/main.go type Store (line 3) | type Store struct method Put (line 7) | func (s Store) Put(id string, foo *Foo) { type Foo (line 12) | type Foo struct function updateMapValue (line 14) | func updateMapValue(mapValue map[string]LargeStruct, id string) { function updateMapPointer (line 20) | func updateMapPointer(mapPointer map[string]*LargeStruct, id string) { type LargeStruct (line 24) | type LargeStruct struct FILE: src/04-control-structures/32-range-loop-pointers/customer-store/main.go type Customer (line 5) | type Customer struct type Store (line 10) | type Store struct method storeCustomers (line 26) | func (s *Store) storeCustomers(customers []Customer) { method storeCustomers2 (line 33) | func (s *Store) storeCustomers2(customers []Customer) { method storeCustomers3 (line 40) | func (s *Store) storeCustomers3(customers []Customer) { function main (line 14) | func main() { function print (line 47) | func print(m map[string]*Customer) { FILE: src/04-control-structures/33-map-iteration/main.go function listing1 (line 5) | func listing1() { function listing2 (line 21) | func listing2() { function copyMap (line 39) | func copyMap(m map[int]bool) map[int]bool { FILE: src/04-control-structures/34-break/main.go function listing1 (line 8) | func listing1() { function listing2 (line 20) | func listing2() { function listing3 (line 33) | func listing3(ctx context.Context, ch <-chan int) { function listing4 (line 44) | func listing4(ctx context.Context, ch <-chan int) { FILE: src/04-control-structures/35-defer-loop/main.go function readFiles1 (line 5) | func readFiles1(ch <-chan string) error { function readFiles2 (line 19) | func readFiles2(ch <-chan string) error { function readFile (line 28) | func readFile(path string) error { function readFiles3 (line 40) | func readFiles3(ch <-chan string) error { FILE: src/05-strings/36-rune/main.go function main (line 5) | func main() { FILE: src/05-strings/37-string-iteration/main.go function main (line 5) | func main() { function getIthRune (line 25) | func getIthRune(largeString string, i int) rune { FILE: src/05-strings/38-trim/main.go function main (line 8) | func main() { FILE: src/05-strings/39-string-concat/main.go function concat1 (line 5) | func concat1(values []string) string { function concat2 (line 13) | func concat2(values []string) string { function concat3 (line 21) | func concat3(values []string) string { FILE: src/05-strings/39-string-concat/main_test.go function BenchmarkConcatV1 (line 7) | func BenchmarkConcatV1(b *testing.B) { function BenchmarkConcatV2 (line 17) | func BenchmarkConcatV2(b *testing.B) { function BenchmarkConcatV3 (line 27) | func BenchmarkConcatV3(b *testing.B) { function getInput (line 37) | func getInput() []string { FILE: src/05-strings/40-string-conversion/main.go function getBytes1 (line 9) | func getBytes1(reader io.Reader) ([]byte, error) { function sanitize1 (line 17) | func sanitize1(s string) string { function getBytes2 (line 21) | func getBytes2(reader io.Reader) ([]byte, error) { function sanitize2 (line 29) | func sanitize2(b []byte) []byte { FILE: src/05-strings/41-substring-memory-leak/main.go function main (line 9) | func main() { type store (line 19) | type store struct method handleLog1 (line 21) | func (s store) handleLog1(log string) error { method handleLog2 (line 31) | func (s store) handleLog2(log string) error { method handleLog3 (line 41) | func (s store) handleLog3(log string) error { method store (line 51) | func (s store) store(uuid string) { FILE: src/06-functions-methods/42-receiver/pointer/main.go type customer (line 5) | type customer struct method add (line 9) | func (c *customer) add(operation float64) { function main (line 13) | func main() { FILE: src/06-functions-methods/42-receiver/struct-with-pointer/main.go type customer (line 5) | type customer struct method add (line 13) | func (c customer) add(operation float64) { type data (line 9) | type data struct function main (line 17) | func main() { FILE: src/06-functions-methods/42-receiver/value/main.go type customer (line 5) | type customer struct method add (line 9) | func (c customer) add(v float64) { function main (line 13) | func main() { FILE: src/06-functions-methods/43-named-result-parameters/main.go function f (line 5) | func f(a int) (b int) { type locator (line 10) | type locator interface type loc (line 15) | type loc struct method getCoordinates (line 17) | func (l loc) getCoordinates(address string) (lat, lng float32, err err... function ReadFull (line 21) | func ReadFull(r io.Reader, buf []byte) (n int, err error) { FILE: src/06-functions-methods/44-side-effects-named-result-parameters/main.go type loc (line 8) | type loc struct method getCoordinates1 (line 10) | func (l loc) getCoordinates1(ctx context.Context, address string) ( method getCoordinates2 (line 25) | func (l loc) getCoordinates2(ctx context.Context, address string) ( method getCoordinates3 (line 40) | func (l loc) getCoordinates3(ctx context.Context, address string) ( method validateAddress (line 55) | func (l loc) validateAddress(address string) bool { FILE: src/06-functions-methods/45-nil-receiver/main.go type MultiError (line 9) | type MultiError struct method Add (line 13) | func (m *MultiError) Add(err error) { method Error (line 17) | func (m *MultiError) Error() string { type Customer (line 21) | type Customer struct method Validate1 (line 26) | func (c Customer) Validate1() error { method Validate2 (line 43) | func (c Customer) Validate2() error { function main (line 63) | func main() { FILE: src/06-functions-methods/46-function-input/main.go function countEmptyLinesInFile (line 9) | func countEmptyLinesInFile(filename string) (int, error) { function countEmptyLines (line 24) | func countEmptyLines(reader io.Reader) (int, error) { function main (line 32) | func main() { FILE: src/06-functions-methods/46-function-input/main_test.go function TestCountEmptyLines (line 8) | func TestCountEmptyLines(t *testing.T) { FILE: src/06-functions-methods/47-defer-evaluation/args/main.go constant StatusSuccess (line 6) | StatusSuccess = "success" constant StatusErrorFoo (line 7) | StatusErrorFoo = "error_foo" constant StatusErrorBar (line 8) | StatusErrorBar = "error_bar" function main (line 11) | func main() { function f1 (line 17) | func f1() error { function f2 (line 36) | func f2() error { function f3 (line 55) | func f3() error { function notify (line 76) | func notify(status string) { function incrementCounter (line 80) | func incrementCounter(status string) { function notifyPtr (line 84) | func notifyPtr(status *string) { function incrementCounterPtr (line 88) | func incrementCounterPtr(status *string) { function foo (line 92) | func foo() error { function bar (line 96) | func bar() error { FILE: src/06-functions-methods/47-defer-evaluation/receiver/pointer/main.go function main (line 5) | func main() { type Struct (line 11) | type Struct struct method print (line 15) | func (s *Struct) print() { FILE: src/06-functions-methods/47-defer-evaluation/receiver/value/main.go function main (line 5) | func main() { type Struct (line 11) | type Struct struct method print (line 15) | func (s Struct) print() { FILE: src/07-error-management/48-panic/main.go function main (line 5) | func main() { function f (line 15) | func f() { function checkWriteHeaderCode (line 21) | func checkWriteHeaderCode(code int) { FILE: src/07-error-management/49-error-wrapping/main.go function bar (line 5) | func bar() error { type barError (line 9) | type barError struct method Error (line 11) | func (b barError) Error() string { function listing1 (line 15) | func listing1() error { type BarError (line 24) | type BarError struct method Error (line 28) | func (b BarError) Error() string { function listing2 (line 32) | func listing2() error { function listing3 (line 41) | func listing3() error { function listing4 (line 50) | func listing4() error { FILE: src/07-error-management/50-compare-error-type/main.go type transientError (line 9) | type transientError struct method Error (line 13) | func (t transientError) Error() string { function handler (line 17) | func handler(w http.ResponseWriter, r *http.Request) { function getTransactionAmount1 (line 35) | func getTransactionAmount1(transactionID string) (float32, error) { function getTransactionAmountFromDB1 (line 47) | func getTransactionAmountFromDB1(id string) (float32, error) { function handler2 (line 51) | func handler2(w http.ResponseWriter, r *http.Request) { function getTransactionAmount2 (line 68) | func getTransactionAmount2(transactionID string) (float32, error) { function getTransactionAmountFromDB2 (line 79) | func getTransactionAmountFromDB2(transactionID string) (float32, error) { FILE: src/07-error-management/51-comparing-error-value/main.go function listing1 (line 8) | func listing1() { function listing2 (line 19) | func listing2() { function query (line 30) | func query() error { FILE: src/07-error-management/52-handling-error-twice/main.go type Route (line 8) | type Route struct function GetRoute1 (line 10) | func GetRoute1(srcLat, srcLng, dstLat, dstLng float32) (Route, error) { function validateCoordinates1 (line 26) | func validateCoordinates1(lat, lng float32) error { function GetRoute2 (line 38) | func GetRoute2(srcLat, srcLng, dstLat, dstLng float32) (Route, error) { function validateCoordinates2 (line 52) | func validateCoordinates2(lat, lng float32) error { function GetRoute3 (line 62) | func GetRoute3(srcLat, srcLng, dstLat, dstLng float32) (Route, error) { function getRoute (line 78) | func getRoute(lat, lng, lat2, lng2 float32) (Route, error) { FILE: src/07-error-management/53-not-handling-error/main.go function listing1 (line 5) | func listing1() { function listing2 (line 11) | func listing2() { function notify (line 19) | func notify() error { FILE: src/07-error-management/54-defer-errors/main.go constant query (line 8) | query = "..." function getBalance1 (line 10) | func getBalance1(db *sql.DB, clientID string) (float32, error) { function getBalance2 (line 21) | func getBalance2(db *sql.DB, clientID string) (float32, error) { function getBalance3 (line 32) | func getBalance3(db *sql.DB, clientID string) (balance float32, err erro... FILE: src/08-concurrency-foundations/56-faster/main.go function sequentialMergesort (line 7) | func sequentialMergesort(s []int) { function parallelMergesortV1 (line 18) | func parallelMergesortV1(s []int) { constant max (line 42) | max = 2048 function parallelMergesortV2 (line 44) | func parallelMergesortV2(s []int) { function merge (line 72) | func merge(s []int, middle int) { FILE: src/08-concurrency-foundations/56-faster/main_test.go function Benchmark_sequentialMergesort (line 11) | func Benchmark_sequentialMergesort(b *testing.B) { function Benchmark_parallelMergesortV1 (line 25) | func Benchmark_parallelMergesortV1(b *testing.B) { function Benchmark_parallelMergesortV2 (line 39) | func Benchmark_parallelMergesortV2(b *testing.B) { function getRandomElements (line 53) | func getRandomElements() []int { FILE: src/08-concurrency-foundations/58-races/memory-model/main.go function listing1 (line 5) | func listing1() { function listing2 (line 12) | func listing2() { function listing3 (line 20) | func listing3() { function listing4 (line 31) | func listing4() { function listing5 (line 42) | func listing5() { function listing6 (line 53) | func listing6() { FILE: src/08-concurrency-foundations/58-races/races/main.go function listing1 (line 8) | func listing1() { function listing2 (line 20) | func listing2() { function listing3 (line 32) | func listing3() { function listing4 (line 49) | func listing4() { function listing5 (line 65) | func listing5() { FILE: src/08-concurrency-foundations/59-workload-type/main.go function main (line 10) | func main() { function read1 (line 18) | func read1(r io.Reader) (int, error) { function read2 (line 34) | func read2(r io.Reader) (int, error) { function task (line 68) | func task(b []byte) int { type dummyReader (line 72) | type dummyReader struct method Read (line 76) | func (c *dummyReader) Read(p []byte) (n int, err error) { FILE: src/08-concurrency-foundations/60-contexts/flight/flight.go type Position (line 3) | type Position struct FILE: src/08-concurrency-foundations/60-contexts/main.go type publisher (line 11) | type publisher interface type publishHandler (line 15) | type publishHandler struct method publishPosition (line 19) | func (h publishHandler) publishPosition(position flight.Position) error { type key (line 25) | type key constant isValidHostKey (line 27) | isValidHostKey key = "isValidHost" function checkValid (line 29) | func checkValid(next http.Handler) http.Handler { function handler (line 38) | func handler(ctx context.Context, ch chan Message) error { type Message (line 50) | type Message struct FILE: src/09-concurrency-practice/61-inappropriate-context/main.go function handler1 (line 9) | func handler1(w http.ResponseWriter, r *http.Request) { function handler2 (line 25) | func handler2(w http.ResponseWriter, r *http.Request) { function handler3 (line 41) | func handler3(w http.ResponseWriter, r *http.Request) { type detach (line 57) | type detach struct method Deadline (line 61) | func (d detach) Deadline() (time.Time, bool) { method Done (line 65) | func (d detach) Done() <-chan struct{} { method Err (line 69) | func (d detach) Err() error { method Value (line 73) | func (d detach) Value(key any) any { function doSomeTask (line 77) | func doSomeTask(context.Context, *http.Request) (string, error) { function publish (line 81) | func publish(context.Context, string) error { function writeResponse (line 85) | func writeResponse(string) {} FILE: src/09-concurrency-practice/62-starting-goroutine/listing1/main.go function main (line 3) | func main() { function newWatcher (line 9) | func newWatcher() { type watcher (line 14) | type watcher struct method watch (line 17) | func (w watcher) watch() {} FILE: src/09-concurrency-practice/62-starting-goroutine/listing2/main.go function main (line 5) | func main() { function newWatcher (line 14) | func newWatcher(ctx context.Context) { type watcher (line 19) | type watcher struct method watch (line 22) | func (w watcher) watch(context.Context) {} FILE: src/09-concurrency-practice/62-starting-goroutine/listing3/main.go function main (line 3) | func main() { function newWatcher (line 10) | func newWatcher() watcher { type watcher (line 16) | type watcher struct method watch (line 19) | func (w watcher) watch() {} method close (line 21) | func (w watcher) close() { FILE: src/09-concurrency-practice/63-goroutines-loop-variables/main.go function listing1 (line 5) | func listing1() { function listing2 (line 15) | func listing2() { function listing3 (line 26) | func listing3() { FILE: src/09-concurrency-practice/64-select-behavior/main.go function main (line 8) | func main() { function listing1 (line 21) | func listing1(messageCh <-chan int, disconnectCh chan struct{}) { function listing2 (line 33) | func listing2(messageCh <-chan int, disconnectCh chan struct{}) { FILE: src/09-concurrency-practice/66-nil-channels/main.go function merge1 (line 3) | func merge1(ch1, ch2 <-chan int) <-chan int { function merge2 (line 19) | func merge2(ch1, ch2 <-chan int) <-chan int { function merge3 (line 37) | func merge3(ch1, ch2 <-chan int) <-chan int { function merge4 (line 69) | func merge4(ch1, ch2 <-chan int) <-chan int { FILE: src/09-concurrency-practice/68-string-formatting/main.go function main (line 8) | func main() { type Customer (line 15) | type Customer struct method UpdateAge1 (line 21) | func (c *Customer) UpdateAge1(age int) error { method UpdateAge2 (line 33) | func (c *Customer) UpdateAge2(age int) error { method UpdateAge3 (line 45) | func (c *Customer) UpdateAge3(age int) error { method String (line 57) | func (c *Customer) String() string { FILE: src/09-concurrency-practice/69-data-race-append/main.go function listing1 (line 5) | func listing1() { function listing2 (line 19) | func listing2() { FILE: src/09-concurrency-practice/70-mutex-slices-maps/main.go function main (line 8) | func main() { type Cache (line 19) | type Cache struct method AddBalance (line 24) | func (c *Cache) AddBalance(id string, balance float64) { method AverageBalance1 (line 30) | func (c *Cache) AverageBalance1() float64 { method AverageBalance2 (line 42) | func (c *Cache) AverageBalance2() float64 { method AverageBalance3 (line 53) | func (c *Cache) AverageBalance3() float64 { FILE: src/09-concurrency-practice/71-wait-group/main.go function listing1 (line 9) | func listing1() { function listing2 (line 25) | func listing2() { function listing3 (line 41) | func listing3() { FILE: src/09-concurrency-practice/72-cond/main.go function listing1 (line 9) | func listing1() { function listing2 (line 40) | func listing2() { function listing3 (line 68) | func listing3() { FILE: src/09-concurrency-practice/73-errgroup/main.go function handler1 (line 10) | func handler1(ctx context.Context, circles []Circle) ([]Result, error) { function handler2 (line 34) | func handler2(ctx context.Context, circles []Circle) ([]Result, error) { function foo (line 57) | func foo(context.Context, Circle) (Result, error) { type Circle (line 62) | type Circle struct type Result (line 63) | type Result struct FILE: src/09-concurrency-practice/74-copying-sync/main.go function main (line 8) | func main() { type Counter (line 21) | type Counter struct method Increment1 (line 30) | func (c Counter) Increment1(name string) { method Increment2 (line 36) | func (c *Counter) Increment2(name string) { function NewCounter (line 26) | func NewCounter() Counter { type Counter2 (line 40) | type Counter2 struct function NewCounter2 (line 45) | func NewCounter2() Counter2 { FILE: src/10-standard-lib/75-wrong-time-duration/main.go function main (line 8) | func main() { function listing1 (line 13) | func listing1() { function listing2 (line 23) | func listing2() { FILE: src/10-standard-lib/76-time-after/main.go function consumer1 (line 9) | func consumer1(ch <-chan Event) { function consumer2 (line 20) | func consumer2(ch <-chan Event) { function consumer3 (line 33) | func consumer3(ch <-chan Event) { type Event (line 48) | type Event struct function handle (line 50) | func handle(Event) { FILE: src/10-standard-lib/77-json-handling/map-any/main.go function listing1 (line 5) | func listing1() error { function getMessage (line 15) | func getMessage() []byte { FILE: src/10-standard-lib/77-json-handling/monotonic-clock/main.go type Event (line 9) | type Event struct function listing1 (line 13) | func listing1() error { function listing2 (line 34) | func listing2() error { FILE: src/10-standard-lib/77-json-handling/type-embedding/main.go function main (line 9) | func main() { type Event1 (line 21) | type Event1 struct function listing1 (line 26) | func listing1() error { type Event2 (line 41) | type Event2 struct function listing2 (line 46) | func listing2() error { type Event3 (line 61) | type Event3 struct method MarshalJSON (line 66) | func (e Event3) MarshalJSON() ([]byte, error) { function listing3 (line 78) | func listing3() error { FILE: src/10-standard-lib/78-sql/null-values/main.go function listing1 (line 5) | func listing1(db *sql.DB, id string) error { function listing2 (line 26) | func listing2(db *sql.DB, id string) error { function listing3 (line 47) | func listing3(db *sql.DB, id string) error { FILE: src/10-standard-lib/78-sql/prepared-statements/main.go function listing1 (line 5) | func listing1(db *sql.DB, id string) error { FILE: src/10-standard-lib/78-sql/rows-iterations-errors/main.go function get1 (line 9) | func get1(ctx context.Context, db *sql.DB, id string) (string, int, erro... function get2 (line 36) | func get2(ctx context.Context, db *sql.DB, id string) (string, int, erro... FILE: src/10-standard-lib/78-sql/sql-open/main.go function listing1 (line 7) | func listing1() error { FILE: src/10-standard-lib/79-closing-resources/http/main.go type handler (line 78) | type handler struct method getBody1 (line 9) | func (h handler) getBody1() (string, error) { method getBody2 (line 23) | func (h handler) getBody2() (string, error) { method getStatusCode1 (line 44) | func (h handler) getStatusCode1(body io.Reader) (int, error) { method getStatusCode2 (line 60) | func (h handler) getStatusCode2(body io.Reader) (int, error) { FILE: src/10-standard-lib/79-closing-resources/os-file/main.go function listing1 (line 8) | func listing1(filename string) error { function writeToFile1 (line 23) | func writeToFile1(filename string, content []byte) (err error) { function writeToFile2 (line 40) | func writeToFile2(filename string, content []byte) (err error) { FILE: src/10-standard-lib/79-closing-resources/sql-rows/main.go function listing1 (line 8) | func listing1() error { function listing2 (line 25) | func listing2() error { FILE: src/10-standard-lib/80-http-return/main.go function handler1 (line 5) | func handler1(w http.ResponseWriter, req *http.Request) { function handler2 (line 15) | func handler2(w http.ResponseWriter, req *http.Request) { function foo (line 26) | func foo(req *http.Request) error { FILE: src/10-standard-lib/81-default-http-client-server/client/main.go function main (line 9) | func main() { FILE: src/10-standard-lib/81-default-http-client-server/server/main.go function main (line 8) | func main() { type handler (line 18) | type handler struct method ServeHTTP (line 20) | func (h handler) ServeHTTP(http.ResponseWriter, *http.Request) {} FILE: src/11-testing/82-categorizing-tests/build-tags/db_test.go function TestInsert1 (line 11) | func TestInsert1(t *testing.T) { function TestInsert2 (line 15) | func TestInsert2(t *testing.T) { FILE: src/11-testing/82-categorizing-tests/short-mode/main_test.go function TestLongRunning (line 5) | func TestLongRunning(t *testing.T) { FILE: src/11-testing/85-table-driven-tests/main.go function removeNewLineSuffixes (line 5) | func removeNewLineSuffixes(s string) string { FILE: src/11-testing/85-table-driven-tests/main_test.go function TestRemoveNewLineSuffix_Empty (line 5) | func TestRemoveNewLineSuffix_Empty(t *testing.T) { function TestRemoveNewLineSuffix_EndingWithCarriageReturnNewLine (line 13) | func TestRemoveNewLineSuffix_EndingWithCarriageReturnNewLine(t *testing.... function TestRemoveNewLineSuffix_EndingWithNewLine (line 21) | func TestRemoveNewLineSuffix_EndingWithNewLine(t *testing.T) { function TestRemoveNewLineSuffix_EndingWithMultipleNewLines (line 29) | func TestRemoveNewLineSuffix_EndingWithMultipleNewLines(t *testing.T) { function TestRemoveNewLineSuffix_EndingWithoutNewLine (line 37) | func TestRemoveNewLineSuffix_EndingWithoutNewLine(t *testing.T) { function TestRemoveNewLineSuffix (line 45) | func TestRemoveNewLineSuffix(t *testing.T) { FILE: src/11-testing/86-sleeping/main.go type Handler (line 3) | type Handler struct method getBestFoo (line 12) | func (h Handler) getBestFoo(someInputs int) Foo { type publisher (line 8) | type publisher interface function getFoos (line 26) | func getFoos(inputs int) []Foo { type Foo (line 30) | type Foo struct FILE: src/11-testing/86-sleeping/main_test.go type publisherMock1 (line 9) | type publisherMock1 struct method Publish (line 14) | func (p *publisherMock1) Publish(got []Foo) { method Get (line 20) | func (p *publisherMock1) Get() []Foo { function TestGetBestFoo (line 26) | func TestGetBestFoo(t *testing.T) { function assert (line 43) | func assert(t *testing.T, assertion func() bool, type publisherMock2 (line 54) | type publisherMock2 struct method Publish (line 58) | func (p *publisherMock2) Publish(got []Foo) { function TestGetBestFoo2 (line 62) | func TestGetBestFoo2(t *testing.T) { FILE: src/11-testing/87-time-api/listing1/main.go type Cache (line 8) | type Cache struct method TrimOlderThan (line 18) | func (c *Cache) TrimOlderThan(since time.Duration) { method Add (line 31) | func (c *Cache) Add(events []Event) { method GetAll (line 38) | func (c *Cache) GetAll() []Event { type Event (line 13) | type Event struct FILE: src/11-testing/87-time-api/listing1/main_test.go function TestCache_TrimOlderThan (line 8) | func TestCache_TrimOlderThan(t *testing.T) { FILE: src/11-testing/87-time-api/listing2/main.go type now (line 8) | type now type Cache (line 10) | type Cache struct method TrimOlderThan (line 28) | func (c *Cache) TrimOlderThan(since time.Duration) { method Add (line 41) | func (c *Cache) Add(events []Event) { method GetAll (line 48) | func (c *Cache) GetAll() []Event { function NewCache (line 16) | func NewCache() *Cache { type Event (line 23) | type Event struct FILE: src/11-testing/87-time-api/listing2/main_test.go function TestCache_TrimOlderThan (line 8) | func TestCache_TrimOlderThan(t *testing.T) { function parseTime (line 22) | func parseTime(t *testing.T, timestamp string) time.Time { FILE: src/11-testing/87-time-api/listing3/main.go type Cache (line 8) | type Cache struct method TrimOlderThan (line 18) | func (c *Cache) TrimOlderThan(now time.Time, since time.Duration) { method Add (line 31) | func (c *Cache) Add(events []Event) { method GetAll (line 38) | func (c *Cache) GetAll() []Event { type Event (line 13) | type Event struct FILE: src/11-testing/87-time-api/listing3/main_test.go function TestCache_TrimOlderThan (line 8) | func TestCache_TrimOlderThan(t *testing.T) { function parseTime (line 24) | func parseTime(t *testing.T, timestamp string) time.Time { FILE: src/11-testing/87-time-api/listing4/main.go type Cache (line 8) | type Cache struct method TrimOlderThan (line 18) | func (c *Cache) TrimOlderThan(t time.Time) { method Add (line 30) | func (c *Cache) Add(events []Event) { method GetAll (line 37) | func (c *Cache) GetAll() []Event { type Event (line 13) | type Event struct FILE: src/11-testing/87-time-api/listing4/main_test.go function TestCache_TrimOlderThan (line 8) | func TestCache_TrimOlderThan(t *testing.T) { function parseTime (line 25) | func parseTime(t *testing.T, timestamp string) time.Time { FILE: src/11-testing/88-utility-package/httptest/main.go function Handler (line 11) | func Handler(w http.ResponseWriter, r *http.Request) { type request (line 30) | type request struct function buildRequestBody (line 34) | func buildRequestBody(lat1, lng1, lat2, lng2 float64) io.Reader { type DurationClient (line 38) | type DurationClient struct method GetDuration (line 18) | func (c DurationClient) GetDuration(url string, lat1, lng1, lat2, lng2... function NewDurationClient (line 42) | func NewDurationClient() DurationClient { function parseResponseBody (line 48) | func parseResponseBody(r io.ReadCloser) (time.Duration, error) { FILE: src/11-testing/88-utility-package/httptest/main_test.go function TestHandler (line 12) | func TestHandler(t *testing.T) { function TestDurationClientGet (line 32) | func TestDurationClientGet(t *testing.T) { FILE: src/11-testing/88-utility-package/iotest/main.go type LowerCaseReader (line 7) | type LowerCaseReader struct method Read (line 11) | func (l LowerCaseReader) Read(p []byte) (int, error) { function foo1 (line 15) | func foo1(r io.Reader) error { function foo2 (line 26) | func foo2(r io.Reader) error { function readAll (line 37) | func readAll(r io.Reader, retries int) ([]byte, error) { FILE: src/11-testing/88-utility-package/iotest/main_test.go function TestLowerCaseReader (line 9) | func TestLowerCaseReader(t *testing.T) { function TestFoo1 (line 19) | func TestFoo1(t *testing.T) { function TestFoo2 (line 28) | func TestFoo2(t *testing.T) { function randomString (line 37) | func randomString(i int) string { FILE: src/11-testing/89-benchmark/compiler-optimizations/main.go constant m1 (line 4) | m1 = 0x5555555555555555 constant m2 (line 5) | m2 = 0x3333333333333333 constant m4 (line 6) | m4 = 0x0f0f0f0f0f0f0f0f constant h01 (line 7) | h01 = 0x0101010101010101 function popcnt (line 10) | func popcnt(x uint64) uint64 { FILE: src/11-testing/89-benchmark/compiler-optimizations/main_test.go function BenchmarkPopcnt1 (line 5) | func BenchmarkPopcnt1(b *testing.B) { function BenchmarkPopcnt2 (line 13) | func BenchmarkPopcnt2(b *testing.B) { FILE: src/11-testing/89-benchmark/observer-effect/main.go function calculateSum512 (line 3) | func calculateSum512(s [][512]int64) int64 { function calculateSum513 (line 13) | func calculateSum513(s [][513]int64) int64 { FILE: src/11-testing/89-benchmark/observer-effect/main_test.go constant rows (line 5) | rows = 1000 function BenchmarkCalculateSum512_1 (line 9) | func BenchmarkCalculateSum512_1(b *testing.B) { function BenchmarkCalculateSum513_1 (line 19) | func BenchmarkCalculateSum513_1(b *testing.B) { function BenchmarkCalculateSum512_2 (line 29) | func BenchmarkCalculateSum512_2(b *testing.B) { function BenchmarkCalculateSum513_2 (line 40) | func BenchmarkCalculateSum513_2(b *testing.B) { function createMatrix512 (line 51) | func createMatrix512(r int) [][512]int64 { function createMatrix513 (line 55) | func createMatrix513(r int) [][513]int64 { FILE: src/11-testing/89-benchmark/timer/main_test.go function BenchmarkFoo1 (line 5) | func BenchmarkFoo1(b *testing.B) { function BenchmarkFoo2 (line 13) | func BenchmarkFoo2(b *testing.B) { function functionUnderTest (line 22) | func functionUnderTest() { function expensiveSetup (line 25) | func expensiveSetup() { FILE: src/11-testing/89-benchmark/wrong-assumptions/main_test.go function BenchmarkAtomicStoreInt32 (line 8) | func BenchmarkAtomicStoreInt32(b *testing.B) { function BenchmarkAtomicStoreInt64 (line 15) | func BenchmarkAtomicStoreInt64(b *testing.B) { FILE: src/11-testing/90-testing-features/different-package/main.go function Inc (line 7) | func Inc() uint64 { FILE: src/11-testing/90-testing-features/different-package/main_test.go function TestCount (line 9) | func TestCount(t *testing.T) { FILE: src/11-testing/90-testing-features/setup-teardown/main_test.go function TestMySQLIntegration (line 9) | func TestMySQLIntegration(t *testing.T) { function createConnection (line 16) | func createConnection(t *testing.T, dsn string) *sql.DB { function TestMain (line 28) | func TestMain(m *testing.M) { function setupMySQL (line 35) | func setupMySQL() {} function teardownMySQL (line 37) | func teardownMySQL() {} FILE: src/11-testing/90-testing-features/utility-function/main.go type Customer (line 3) | type Customer struct FILE: src/11-testing/90-testing-features/utility-function/main_test.go function TestCustomer1 (line 8) | func TestCustomer1(t *testing.T) { function createCustomer1 (line 17) | func createCustomer1(someArg string) (Customer, error) { function TestCustomer2 (line 25) | func TestCustomer2(t *testing.T) { function createCustomer2 (line 31) | func createCustomer2(t *testing.T, someArg string) Customer { function customerFactory (line 39) | func customerFactory(someArg string) (Customer, error) { FILE: src/12-optimizations/91-cpu-caches/cache-line/main.go function sum2 (line 3) | func sum2(s []int64) int64 { function sum8 (line 11) | func sum8(s []int64) int64 { FILE: src/12-optimizations/91-cpu-caches/cache-line/main_test.go function BenchmarkSum2 (line 7) | func BenchmarkSum2(b *testing.B) { function BenchmarkSum8 (line 18) | func BenchmarkSum8(b *testing.B) { FILE: src/12-optimizations/91-cpu-caches/predictability/main.go type node (line 3) | type node struct function linkedList (line 8) | func linkedList(n *node) int64 { function sum2 (line 17) | func sum2(s []int64) int64 { FILE: src/12-optimizations/91-cpu-caches/predictability/main_test.go constant n (line 7) | n = 1_000_000 function BenchmarkLinkedList (line 9) | func BenchmarkLinkedList(b *testing.B) { function BenchmarkSum2 (line 23) | func BenchmarkSum2(b *testing.B) { FILE: src/12-optimizations/91-cpu-caches/slice-structs/main.go type Foo (line 3) | type Foo struct function sumFoo (line 8) | func sumFoo(foos []Foo) int64 { type Bar (line 16) | type Bar struct function sumBar (line 21) | func sumBar(bar Bar) int64 { FILE: src/12-optimizations/91-cpu-caches/slice-structs/main_test.go constant n (line 7) | n = 1_000_000 function BenchmarkSumFoo (line 9) | func BenchmarkSumFoo(b *testing.B) { function BenchmarkSumBar (line 20) | func BenchmarkSumBar(b *testing.B) { FILE: src/12-optimizations/92-false-sharing/main.go type Input (line 5) | type Input struct type Result1 (line 10) | type Result1 struct function count1 (line 15) | func count1(inputs []Input) Result1 { type Result2 (line 39) | type Result2 struct function count2 (line 45) | func count2(inputs []Input) Result2 { FILE: src/12-optimizations/92-false-sharing/main_test.go constant n (line 5) | n = 1_000_000 function BenchmarkCount1 (line 9) | func BenchmarkCount1(b *testing.B) { function BenchmarkCount2 (line 22) | func BenchmarkCount2(b *testing.B) { FILE: src/12-optimizations/93-instruction-level-parallelism/main.go constant n (line 3) | n = 1_000_000 function add (line 5) | func add(s [2]int64) [2]int64 { function add2 (line 15) | func add2(s [2]int64) [2]int64 { FILE: src/12-optimizations/93-instruction-level-parallelism/main_test.go function BenchmarkAdd (line 7) | func BenchmarkAdd(b *testing.B) { function BenchmarkAdd2 (line 16) | func BenchmarkAdd2(b *testing.B) { FILE: src/12-optimizations/94-data-alignment/main.go type Foo1 (line 3) | type Foo1 struct function sum1 (line 9) | func sum1(foos []Foo1) int64 { type Foo2 (line 17) | type Foo2 struct function sum2 (line 23) | func sum2(foos []Foo2) int64 { FILE: src/12-optimizations/94-data-alignment/main_test.go constant n (line 5) | n = 1_000_000 function BenchmarkSum1 (line 9) | func BenchmarkSum1(b *testing.B) { function BenchmarkSum2 (line 19) | func BenchmarkSum2(b *testing.B) { FILE: src/12-optimizations/95-stack-heap/main.go function listing1 (line 3) | func listing1() { function sumValue (line 12) | func sumValue(x, y int) int { function listing2 (line 17) | func listing2() { function sumPtr (line 26) | func sumPtr(x, y int) *int { function listing3 (line 31) | func listing3() { function sum (line 39) | func sum(x, y *int) int { FILE: src/12-optimizations/95-stack-heap/main_test.go function BenchmarkSumValue (line 10) | func BenchmarkSumValue(b *testing.B) { function BenchmarkSumPtr (line 19) | func BenchmarkSumPtr(b *testing.B) { FILE: src/12-optimizations/96-reduce-allocations/compiler/main.go type cache (line 3) | type cache struct method get1 (line 7) | func (c *cache) get1(bytes []byte) (v int, contains bool) { method get2 (line 13) | func (c *cache) get2(bytes []byte) (v int, contains bool) { FILE: src/12-optimizations/96-reduce-allocations/sync-pool/main.go function write (line 15) | func write(w io.Writer) { function getResponse (line 27) | func getResponse([]byte) {