Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

timeutil

The timeutil package provides simple semantic wrappers for timestamps.

Usage Example

package main

import (
	"fmt"
	"time"
	"github.com/weprodev/go-pkg/timeutil"
)

func main() {
	now := timeutil.Now()
	fmt.Println("Current Time:", now)

	// Avoid ugly nil checks in DTO conversions:
	ptr := timeutil.ToPointer(now)
	fmt.Println("Is pointer nil?", ptr == nil)
}