Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

aklinkert/go-jsontime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-jsontime

A slim time.Time wrapper that handles pointer to time and formats the encoded time as RFC3339/ISO8601, which is easy to format and read from.

Usage

Either use jsontime.JSONTime as a pointer or the object itself, then just use it with the default json package.

type testJSON struct {
	Test JSONTime `json:"test"`
}

type testPtrJSON struct {
	Test *JSONTime `json:"test"`
}

For a more detailed usage example please have a look at the tests.

License

MIT License

Copyright (c) 2019 Alexander Pinnecke

About

A nullable time.Time wrapper with automated RFC3339 time formatting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages