Brijesh's Git Server — watchman_client @ ab8299774c357f80bce54ac30891351f625b7c0c

client library for using watchman in go programs

utils.go (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
package watchman_client

import (
	"time"

	"github.com/google/uuid"
)

func GenerateUUID() string {
	return uuid.New().String()
}

func TimeStampToHumanReadable(timestamp int64) string {
	t := time.Unix(timestamp, 0)
	dateFormat := "2006-01-02 15:04:05"

	return t.Format(dateFormat)
}