Back to

Package utils

Latest Go to latest

The highest tagged major version is .

Published: Jun 19, 2020 | License: MIT | Module:



const Layout = "2006-01-02T15:04:05.000Z07:00"

Layout represent the formatter to be used for time parsing. Go doesn't provide a time parser that support millis time.RFC3339 (no millis) or time.RFC3339nano (nano seconds)

func PerformRequest

func PerformRequest(r http.Handler, method, path string, headers map[string]string) *httptest.ResponseRecorder

func TestRouter

func TestRouter() *gin.Engine

type ISO8601Time

type ISO8601Time time.Time

ISO8601Time represents a date time that can be marshalled and unmarshalled following the ISO 8601 convention.

func (*ISO8601Time) MarshalJSON

func (t *ISO8601Time) MarshalJSON() ([]byte, error)

MarshalJSON creates a JSON representation for a date, following the ISO 8601 convention.

func (*ISO8601Time) String

func (t *ISO8601Time) String() string

String returns the string representation using ISO8601 format

func (*ISO8601Time) UnmarshalJSON

func (t *ISO8601Time) UnmarshalJSON(b []byte) error

UnmarshalJSON parses a JSON representation, following the ISO 8601 convention, to a time element.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier