Files
m3o-go/examples/time/now/returnsCurrentTimeOptionallyWithLocation.go
2021-10-29 10:44:29 +00:00

16 lines
274 B
Go
Executable File

package example
import (
"fmt"
"os"
"go.m3o.com/time"
)
// Get the current time
func ReturnsCurrentTimeOptionallyWithLocation() {
timeService := time.NewTimeService(os.Getenv("M3O_API_TOKEN"))
rsp, err := timeService.Now(&time.NowRequest{})
fmt.Println(rsp, err)
}