Golang - Enter/Input a URL Code Example

The code for Enter/Input a URL

package main
 
import (
    "fmt"
)
func main() {
    var url string
    fmt.Print("Enter website's URL: ")
    fmt.Scan(&url)
    fmt.Print("URL is: ", url)
}

/*
Output:
Enter website's URL: https://www.includehelp.com
URL is: https://www.includehelp.com
*/
Code by IncludeHelp, on February 28, 2023 15:40

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.