Conditions in golang

package main

import "fmt"

func main() {
    // Example 1: if statement
    x := 10
    if x > 5 {
        fmt.Println("x is greater than 5")
    } else {
        fmt.Println("x is not greater than 5")
    }

    // Example 2: if-else if-else ladder
    y := 7
    if y > 10 {
        fmt.Println("y is greater than 10")
    } else if y > 5 {
        fmt.Println("y is greater than 5 but not greater than 10")
    } else {
        fmt.Println("y is not greater than 5")
    }

    // Example 3: switch statement
    day := "Monday"
    switch day {
    case "Monday":
        fmt.Println("It's Monday")
    case "Tuesday":
        fmt.Println("It's Tuesday")
    default:
        fmt.Println("It's another day of the week")
    }

    // Example 4: switch with multiple cases
    num := 3
    switch num {
    case 1, 2:
        fmt.Println("It's 1 or 2")
    case 3, 4:
        fmt.Println("It's 3 or 4")
    default:
        fmt.Println("It's something else")
    }

    // Example 5: short statement in if
    if a := 8; a > 5 {
        fmt.Println("a is greater than 5")
    }
}