Change string in lower case with ToLower function

You can convert a string into lower case (all letters in small letters) with using of ToLower function of string package. The example of ToLower method is mentioned below: Code



package main

import (
    "fmt"
    "strings"
)

func main() {
    // Declare a string
    greetingStr := "Good Morning"
    result := strings.ToLower(greetingStr);
    // Convert to lowercase
    fmt.Println("Lowercase:", result)
}