Hours returns the duration as a floating point number of hours.
package main import ( "fmt" "time" ) func main() { h, _ := time.ParseDuration("4h30m") fmt.Printf("I've got %.1f hours of work left.", h.Hours()) }