package main import ( "fmt" "time" ) func main() { now := time.Now() hour := now.Hour() fmt.Printf("The current hour is: %d\n", hour) }In this example, we first get the current time using the `time.Now()` function. Then, we call the `Hour()` method on the `now` variable to get the hour component of the time. Finally, we print the hour to the console using `fmt.Printf()`. The package library used in this example is the standard Go `time` package.