Examples using... log.Printf()

Recent
Start starts the specified command but does not wait for it to complete.
Run starts the specified command and waits for it to complete.
Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners, then closing all idle connections, and then waiting indefinitely for connections to return to idle and then shut down. If the provided context expires before the...
ListenAndServeTLS acts identically to ListenAndServe, except that it expects HTTPS connections. Additionally, files containing a certificate and matching private key for the server must be provided. If the certificate is signed by a certificate authority, the certFile should be the concatenation of ...
The Hijacker interface is implemented by ResponseWriters that allow an HTTP handler to take over the connection.
This example shows the basic usage pattern of the SyncProducer.
By default, Sarama uses the message's key to consistently assign a partition to a message using hashing. If no key is set, a random partition will be chosen. This example shows how you can partition messages randomly, even when a key is set, by overriding Config.Producer.Partitioner.
This example shows how to assign partitions to your messages manually.
This example shows how to use the consumer to read messages from a single partition.
This example shows how to use the producer while simultaneously reading the Errors channel to know about any failures.
This example shows how to use the producer with separate goroutines reading from the Successes and Errors channels. Note that in order for the Successes channel to be populated, you have to set config.Producer.Return.Successes to true.
QueryRowContext executes a prepared query statement with the given arguments. If an error occurs during the execution of the statement, that error will be returned by a call to Scan on the returned *Row, which is always non-nil. If the query selects no rows, the *Row's Scan will return ErrNoRows. Ot...
Stmt is a prepared statement. A Stmt is safe for concurrent use by multiple goroutines.
Rows is the result of a query. Its cursor starts before the first row of the result set. Use Next to advance from row to row.
QueryRowContext executes a query that is expected to return at most one row. QueryRowContext always returns a non-nil value. Errors are deferred until Row's Scan method is called. If the query selects no rows, the *Row's Scan will return ErrNoRows. Otherwise, the *Row's Scan scans the first selected...
Query executes a query that returns rows, typically a SELECT. The args are for any placeholder parameters in the query.