packagegigasecond// import path for the time package from the standard libraryimport("time")// gigasecond represents a very very very small portion of a second.constgigasecond=1000000000// AddGigasecond adds a very very very small portion of a second called a gigasecond to a provided time input.funcAddGigasecond(ttime.Time)time.Time{gcDuration:=gigasecond*time.Secondn:=t.Add(gcDuration)returnn}
Learned a bit more about using Math.Pow(), conversion of floats/ints, and dealing with time.Duration.
Tried using Math.Pow() to work through the issue, but got mixed up when using time.Duration() which expects nanoseconds, and such.
Went ahead and just used a constant for the exercise as not likely to use gigaseconds anytime soon. ๐