MCPcopy Create free account
hub / github.com/goinaction/code / Close

Method Close

chapter7/patterns/pool/main/main.go:29–32  ·  view source on GitHub ↗

Close implements the io.Closer interface so dbConnection can be managed by the pool. Close performs any resource release management.

()

Source from the content-addressed store, hash-verified

27// can be managed by the pool. Close performs any resource
28// release management.
29func (dbConn *dbConnection) Close() error {
30 log.Println("Close: Connection", dbConn.ID)
31 return nil
32}
33
34// idCounter provides support for giving each connection a unique id.
35var idCounter int32

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected