From 3fa586fa96352c5db651e994c7fe9878bd4db671 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Mon, 17 Jul 2023 15:32:44 -0400 Subject: [PATCH] [go] time --- content/notes/golang/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/notes/golang/index.md b/content/notes/golang/index.md index 9e165d2..7a76674 100644 --- a/content/notes/golang/index.md +++ b/content/notes/golang/index.md @@ -155,9 +155,14 @@ I find [Go][1] really compelling, even though it's not super applicable to my jo > > To create an anonymous struct, just instantiate the instance immediately using a second pair of brackets after declaring the type. +* [Time][23] + * `time.Duration` -- `time.Second * 1e9` is a duration of one billion seconds + * `1e9` is the same as `1.0*math.Pow(10, 9)` + [17]: https://stackoverflow.com/a/40951013 [18]: https://go.dev/doc/effective_go#named-results [19]: https://exercism.org/tracks/go/concepts/errors [20]: https://go.dev/blog/maps [21]: https://go.dev/ref/spec#RangeClause [22]: https://blog.boot.dev/golang/anonymous-structs-golang/ +[23]: https://pkg.go.dev/time