Skip to main content

creating first go program

for creating go program open your editor and paste this code, and save it as filename.go for example helloworld.go

package main

import "fmt"

func main() {
    fmt.Println("Hello, 世界")

I will explain these codes in details for now , we will look how to run these code.

to run type go run helloworld.go  in terminal , we get

you can try golang online as well , golang


Popular posts from this blog

creating python django project

If you installed and configured python django you can create django project .

for that create a folder any where in you system and open you terminal navigate to that folder and type the django command django-admin startproject projectname  for example django-admin startproject firstdjangoproject

This command will create a folder firstdjangoproject        , navigate inside to the project folder . You can see file structure of django project

I will explain each of this files in detail for now lets run the application

for running the application need to type this command in your terminal

python runserver

Ignore the migration exception , we can see the application running at localhost port 8000, 8000 is the default port . Now open your web browser and type address and you can see

if you see this your django application is up and running and you are good to go. press ctrl+c keys to stop the server.