duration := 5 * time.Hour
duration := 5 * time.Hour duration += 2 * time.Hour
duration := 150 * time.Minute hours := duration.Hours()In all these examples, we are using the time package library to work with duration in hours. Overall, the go time Duration Hours is great for working with durations that are expressed in hours. It is a convenient and easy-to-use package for dealing with time-related functionality.