<aside> <img src="/icons/code_red.svg" alt="/icons/code_red.svg" width="40px" />
First Install GO using
.msiinstaller.
</aside>
<aside> <img src="/icons/code_red.svg" alt="/icons/code_red.svg" width="40px" />
main.go , and open with integrated terminal.then command
</aside>go mod init <module_name>
go.mod file in the directory (good ethic)// main.go file
package main
import "fmt"
func main() {
fmt.Println("Hello world")
}
// hello world program
go run main.go


**package main
import "fmt"
func main() {
var username string = "niraj"
fmt.Println(username)
fmt.Printf("Type of the Variable is : %T \\n",username)
var isLoggedIn bool = true
fmt.Println(isLoggedIn)
fmt.Printf("Type of the Variable is : %T \\n",isLoggedIn)
}**
package main
**import "fmt"
const LoginToken string = "sk,gbskgskjgbjksar" // Capital letter at start means its public
// to use**
func main(){
var website = "Niraj salunke"
fmt.Println(website)
// Once a value of specific type is given, type cannot be modified later,
// cannot assign website name as 3 (a integer) afterwards, can be assigned another
// string
//Also ther is no var style
numberOfUser := 300; // this method is only allowed inside functions not outside
fmt.Println(numberOfUser)
}
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
reader := bufio.NewReader(os.Stdin)
fmt.Println("Enter ur age:- ")
input, _ := reader.ReadString('\\n')
fmt.Println("ok", input)
}
_ is used to store the error, as go lang doesn’t have trycatcb in it.