MCPcopy Create free account

hub / github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition / functions

Functions795 in github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition

↓ 1 callersFunctionFullStruct
FullStruct demonstrates serialize and deserialize for an Full struct with tags
chapter3/tags/tags.go:39
↓ 1 callersMethodGet
Get gets a value given a key, or say not found if it doesn't exist
chapter8/grpcjson/internal/keyvalue.go:35
↓ 1 callersMethodGetByName
(context.Context, string)
chapter6/storage/storage.go:16
↓ 1 callersMethodGetGreeting
()
chapter7/twirp/rpc/greeter/greeter.pb.go:53
↓ 1 callersMethodGetGreeting
()
chapter7/grpc/greeter/greeter.pb.go:47
↓ 1 callersMethodGetHandler
GetHandler wraps our RPC Get call
chapter8/grpcjson/http/get.go:14
↓ 1 callersFunctionGetItems
GetItems will return our items object
chapter14/fastweb/handlers.go:10
↓ 1 callersMethodGetName
()
chapter7/twirp/rpc/greeter/greeter.pb.go:60
↓ 1 callersMethodGetName
()
chapter7/grpc/greeter/greeter.pb.go:54
↓ 1 callersMethodGetThenSet
GetThenSet checks if a value is set. If not it sets it.
chapter9/mockgen/exec.go:11
↓ 1 callersFunctionGetToken
GetToken retrieves a github oauth2 token
chapter7/oauthstore/storage.go:17
↓ 1 callersFunctionGetToken
GetToken retrieves a github oauth2 token
chapter7/oauthcli/config.go:25
↓ 1 callersFunctionGobExample
GobExample demonstrates using the gob package
chapter3/encoding/gob.go:19
↓ 1 callersMethodGreet
Greet implements twirp Greet
chapter7/twirp/server/greeter.go:17
↓ 1 callersMethodGreet
Greet implements grpc Greet
chapter7/grpc/server/greeter.go:17
↓ 1 callersFunctionGreetingHandler
GreetingHandler returns a GreetingResponse which either has errors or a useful payload
chapter8/handlers/post.go:21
↓ 1 callersFunctionGuessHandler
GuessHandler checks if ?message=password
chapter14/pprof/crypto/handler.go:10
↓ 1 callersFunctionHTMLDifferences
HTMLDifferences highlights some of the differences between html/template and text/template
chapter1/templates/html_templates.go:11
↓ 1 callersMethodHandleLog
HandleLog adds a hook and does the emitting
chapter4/structured/apex.go:25
↓ 1 callersFunctionHandler
Handler grabs the get param ?next= and tries to transition to the state contained there
chapter11/consensus/handler.go:10
↓ 1 callersFunctionHandler
Handler is very basic
chapter8/middleware/handler.go:8
↓ 1 callersFunctionHandler
Handler gets a negotiator using the request, then renders a Payload
chapter8/negotiate/handler.go:16
↓ 1 callersFunctionHandler
Handler takes a request and renders a response
chapter9/bdd/handler.go:16
↓ 1 callersFunctionHelloHandler
HelloHandler takes a GET parameter "name" and responds with Hello <name>! in plaintext
chapter8/handlers/get.go:10
↓ 1 callersFunctionIncrementVersion
IncrementVersion increments a WorkWiths Version
chapter3/collections/functions.go:14
↓ 1 callersFunctionInitTemplates
InitTemplates sets up templates from a directory
chapter1/templates/template_files.go:16
↓ 1 callersFunctionInitialize
Initialize calls 3 functions to set up, then logs before terminating
chapter4/context/collect.go:13
↓ 1 callersMethodInput
()
chapter12/asynckafka/producer/mocks_test.go:60
↓ 1 callersFunctionInterfaces
Interfaces demonstrates casting from anonymous interfaces to types
chapter3/dataconv/interfaces.go:20
↓ 1 callersMethodLevels
Levels is what levels this hook will fire on
chapter4/structured/logrus.go:18
↓ 1 callersFunctionLoadConfig
LoadConfig will load files optionally from the json file stored at path, then will override those values based on the envconfig struct tags. The envPr
chapter2/envvar/config.go:15
↓ 1 callersFunctionLog
Log uses the setup logger
chapter4/log/log.go:10
↓ 1 callersFunctionLogger
Logger logs requests, this will use an id passed in via SetID()
chapter8/middleware/middleware.go:24
↓ 1 callersFunctionLogrus
Logrus demonstrates some basic logrus functionality
chapter4/structured/logrus.go:23
↓ 1 callersFunctionLookupAddress
LookupAddress returns a DNSLookup consisting of a cname and host for a given address
chapter5/dns/dns.go:27
↓ 1 callersFunctionLowerCaseData
LowerCaseData does a ToLower to the Data string of a WorkWith
chapter3/collections/functions.go:7
↓ 1 callersFunctionMap
Map is a functional map. It takes a list of WorkWith and a WorkWith Function that takes a WorkWith and returns a modified WorkWith. The end result is
chapter3/collections/collections.go:30
↓ 1 callersFunctionMarshalAll
MarshalAll takes some data stored in structs and converts them to the various data formats
chapter2/confformat/marshal.go:7
↓ 1 callersFunctionModifyString
ModifyString modifies a string in a number of ways
chapter1/bytestrings/string.go:31
↓ 1 callersFunctionNew
New initializes a controller with our local validation, it can be overwritten
chapter8/validation/controller.go:10
↓ 1 callersFunctionNewEncodingApp
NewEncodingApp wires together the components
chapter12/goflow/network.go:8
↓ 1 callersFunctionNewKeyValue
NewKeyValue initializes the KeyValue struct and its map
chapter8/grpcjson/internal/keyvalue.go:19
↓ 1 callersFunctionNewMockDB
(ctrl *gomock.Controller)
chapter6/dbinterface/mocks_test.go:23
↓ 1 callersFunctionNewMongoStorage
NewMongoStorage initializes a MongoStorage
chapter6/storage/mongoconfig.go:18
↓ 1 callersFunctionNewOrdinal
NewOrdinal returns ordinal with once setup
chapter10/atomic/ordinal.go:17
↓ 1 callersFunctionNewSafeMap
NewSafeMap creates a SafeMap
chapter10/atomic/map.go:16
↓ 1 callersFunctionNewUpperApp
NewUpperApp wires together the compoents
chapter12/kafkaflow/network.go:6
↓ 1 callersFunctionNullEncoding
NullEncoding shows an alternative method for dealing with nil/omitted values
chapter3/nulls/nullencoding.go:36
↓ 1 callersFunctionOldVersion
OldVersion returns a closures that validates the version is greater than the specified amount
chapter3/collections/functions.go:22
↓ 1 callersFunctionOperate
Operate manipulates files and directories
chapter1/filedirs/dirs.go:10
↓ 1 callersFunctionOtherJSONExamples
OtherJSONExamples shows ways to use types beyond structs and other useful functions
chapter2/confformat/json.go:36
↓ 1 callersFunctionPanic
Panic panics with a divide by zero
chapter4/panic/panic.go:9
↓ 1 callersFunctionPerformOperations
PerformOperations creates a candle item then gets it
chapter6/storage/exec.go:29
↓ 1 callersFunctionPipeExample
PipeExample helps give some more examples of using io interfaces
chapter1/interfaces/pipes.go:9
↓ 1 callersFunctionPointerEncoding
PointerEncoding shows methods for dealing with nil/omitted values
chapter3/nulls/pointer.go:17
↓ 1 callersMethodPresent
Present can be used to determine if we should return this
chapter10/waitgroup/tasks.go:38
↓ 1 callersFunctionPrinter
Printer will print anything sent on the ch chan and will print tock every 200 milliseconds this will repeat forever until a context is Done, i.e. time
chapter10/channels/printer.go:13
↓ 1 callersMethodProcess
Process Prints the current line received
chapter12/goflow/components.go:28
↓ 1 callersMethodProcess
Process is a handler that validates a post payload
chapter8/validation/process.go:10
↓ 1 callersFunctionProcessor
Processor routes work to Process
chapter10/state/processor.go:6
↓ 1 callersFunctionReportHandler
ReportHandler will emit the current metrics in json format
chapter11/metrics/report.go:10
↓ 1 callersFunctionResolve
Resolve handles filtering cards by suit and value
chapter12/graphql/cards/resolve.go:11
↓ 1 callersMethodRollback
()
chapter6/dbinterface/transaction.go:19
↓ 1 callersMethodRoundTrip
RoundTrip Implements RoundTripper interface
chapter7/client/client.go:34
↓ 1 callersMethodRoundTrip
RoundTrip does the basic auth before deferring to the default transport
chapter7/rest/transport.go:14
↓ 1 callersFunctionRunTemplate
RunTemplate initializes a template and demonstrates a variety of template helper functions
chapter1/templates/templates.go:49
↓ 1 callersFunctionSearchString
SearchString shows a number of methods for searching a string
chapter1/bytestrings/string.go:12
↓ 1 callersFunctionSender
Sender sends "tick"" on ch until done is written to, then it sends "sender done." and exits
chapter10/channels/sender.go:8
↓ 1 callersMethodServeHTTP
ServeHTTP means that proxy implments the Handler interface It manipulates the request, forwards it to BaseURL, then returns the response
chapter8/proxy/proxy.go:18
↓ 1 callersFunctionSetLog
SetLog sets the log
chapter4/global/global.go:34
↓ 1 callersMethodSetValue
SetValue modifies the underlying storage of the controller object
chapter8/controllers/post.go:9
↓ 1 callersFunctionSetup
Setup prepares and returns our card schema
chapter12/graphql/cards/schema.go:7
↓ 1 callersFunctionSetup
Setup configures and returns our database connection poold
chapter6/database/config.go:20
↓ 1 callersFunctionShowConv
ShowConv demonstrates some type conversion
chapter3/dataconv/dataconv.go:6
↓ 1 callersFunctionSomeFunc
SomeFunc returns an error
chapter4/basicerrors/custom.go:18
↓ 1 callersFunctionSort
Sort performs a sort redis operations
chapter6/redis/sort.go:10
↓ 1 callersFunctionStackTrace
StackTrace will print all the stack for the error
chapter4/errwrap/unwrap.go:29
↓ 1 callersFunctionStrconv
Strconv demonstrates some strconv functions
chapter3/dataconv/strconv.go:10
↓ 1 callersMethodString
()
chapter7/twirp/rpc/greeter/greeter.pb.go:30
↓ 1 callersFunctionStringReader
StringReader demonstrates how to create an io.Reader interface quickly with a string
chapter1/bytestrings/string.go:48
↓ 1 callersFunctionTimerHandler
TimerHandler records the duration required to compelete
chapter11/metrics/handler.go:20
↓ 1 callersMethodToken
Token satisfies the TokenSource interface
chapter7/oauthstore/tokensource.go:15
↓ 1 callersMethodTweak
Tweak conforms to the RPC library which require: - the method's type is exported. - the method is exported. - the method has two arguments, both expor
chapter5/rpc/tweak/tweak.go:25
↓ 1 callersFunctionUnmarshalAll
UnmarshalAll takes data in various formats and converts them into structs
chapter2/confformat/unmarshal.go:19
↓ 1 callersFunctionUnwrap
Unwrap will unwrap an error and do type assertion to it
chapter4/errwrap/unwrap.go:11
↓ 1 callersFunctionUseLog
UseLog demonstrates using our global log
chapter4/global/log.go:5
↓ 1 callersFunctionValidatePayload
ValidatePayload is 1 implementation of the closure in our controller
chapter8/validation/validate.go:21
↓ 1 callersFunctionVersionHandler
VersionHandler writes the latest version info
chapter11/docker/version.go:18
↓ 1 callersFunctionWorkWithBuffer
WorkWithBuffer will make use of the buffer created by the Buffer function
chapter1/bytestrings/bytes.go:11
↓ 1 callersFunctionWorkWithTemp
WorkWithTemp will give some basic patterns for working with temporary files and directories
chapter1/tempfiles/temp_files.go:11
↓ 1 callersFunctionWrap
Wrap shows what happens when we wrap an error
chapter4/errwrap/errwrap.go:21
↓ 1 callersFunctionWriteCSVBuffer
WriteCSVBuffer returns a buffer csv for a set of books
chapter1/csvformat/write_csv.go:57
↓ 1 callersFunctionWriteCSVOutput
WriteCSVOutput initializes a set of books and writes the to os.Stdout
chapter1/csvformat/write_csv.go:40
↓ 1 callersFunctionbroadcast
(conn *net.UDPConn, conns *connections)
chapter5/udp/server/broadcast.go:16
↓ 1 callersFunctioncallRequestReceived
Call twirp.ServerHooks.RequestReceived if the hook is available
chapter7/twirp/rpc/greeter/greeter.twirp.go:711
↓ 1 callersFunctioncatchSig
catchSig cleans up our websocket conenction if we kill the program with a ctrl-c
chapter5/websocket/client/main.go:13
↓ 1 callersFunctiondoJSONRequest
doJSONRequest is common code to make a request to the remote twirp service.
chapter7/twirp/rpc/greeter/greeter.twirp.go:666
↓ 1 callersFunctiondoProtobufRequest
doProtobufRequest is common code to make a request to the remote twirp service.
chapter7/twirp/rpc/greeter/greeter.twirp.go:617
↓ 1 callersFunctionechoBackCapitalized
(conn net.Conn)
chapter5/tcp/server/main.go:12
↓ 1 callersFunctionexample
()
chapter9/tools/funcs.go:7
← previousnext →201–300 of 795, ranked by callers