golang get day of week from time
package main
import (
"fmt"
"time"
)
func main() {
// Get the current time
currentTime := time.Now()
// Extract the day of the week from the current time
dayOfWeek := currentTime.Weekday()
// Print the day of the week
fmt.Println("Day of the week:", dayOfWeek)
}