mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-03 11:53:43 +02:00
src/eosapi/functions.go: import jsontime with a more descriptive name than "v2"
This commit is contained in:
parent
82c32d7901
commit
5907d96176
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"github.com/imroc/req"
|
"github.com/imroc/req"
|
||||||
"github.com/liamylian/jsontime/v2"
|
jsontime "github.com/liamylian/jsontime/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ReqParams struct {
|
type ReqParams struct {
|
||||||
|
|
@ -15,12 +15,12 @@ type ReqParams struct {
|
||||||
Host string
|
Host string
|
||||||
}
|
}
|
||||||
|
|
||||||
var json = v2.ConfigWithCustomTimeFormat
|
var json = jsontime.ConfigWithCustomTimeFormat
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
||||||
// EOS Api does not specify timezone in timestamps (they are always UTC tho).
|
// EOS Api does not specify timezone in timestamps (they are always UTC tho).
|
||||||
v2.SetDefaultTimeFormat("2006-01-02T15:04:05", time.UTC)
|
jsontime.SetDefaultTimeFormat("2006-01-02T15:04:05", time.UTC)
|
||||||
}
|
}
|
||||||
|
|
||||||
func send(p ReqParams, method string, path string) (*req.Resp, error) {
|
func send(p ReqParams, method string, path string) (*req.Resp, error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue