Documentation ¶
Index ¶
- Variables
- func JoinURL(base, suffix string) (string, error)
- func LoadLocation(name string) (*time.Location, error)
- func RenderSize(maxSize int, input string, renderFunc func(string) (string, error)) (string, error)
- func RenderSizeN(maxSize int, inputs []string, renderFunc func([]string) (string, error)) (result string, err error)
- type ContextPreparer
- type Prepare
- type PrepareStmt
- type Preparer
- type QueryError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSolution = fmt.Errorf("no solution")
ErrNoSolution is returned by RenderSize when it can't find a solution.
Functions ¶
func JoinURL ¶
JoinURL will join a base URL and suffix, taking care to preserve and merge query parameters.
func LoadLocation ¶
LoadLocation works like time.LoadLocation but caches the result for the life of the process.
func RenderSize ¶ added in v0.30.0
RenderSize will return the rendered result as close as possible to the max size.
Types ¶
type ContextPreparer ¶
type Prepare ¶
Prepare is used to prepare SQL statements.
If Ctx is specified, it will be used to prepare all statements. Only the first error is recorded. Subsequent calls to `P` are ignored after a failure.
type PrepareStmt ¶
func (*PrepareStmt) PrepareFor ¶
func (p *PrepareStmt) PrepareFor(ctx context.Context, cp ContextPreparer) (*sql.Stmt, error)
type QueryError ¶
Click to show internal directories.
Click to hide internal directories.