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

16 lines
285 B
Go
Executable File

package example
import (
"fmt"
"os"
"github.com/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)
}