• Courses
  • YouTube
  • Dev News
  • Technology
  • Blogs
  • Flutter Jobs
  • Contact
    • About Us
    • RegisterLogin
    Navoki
    • Courses
    • YouTube
    • Dev News
    • Technology
    • Blogs
    • Flutter Jobs
    • Contact
      • About Us
    • RegisterLogin

      Uncategorized

      • Home
      • Blog
      • Uncategorized
      • Your First Program in Go Programming Language Tutorial Online
      Your-First-Program-In-Go-Programming-Language-Tutorial-Online

      Your First Program in Go Programming Language Tutorial Online

      • Posted by Shivam Srivastava
      • Categories Uncategorized, Go Lang
      • Date April 23, 2020
      • Comments 0 comment
      Spread the love

      Golang Bever | Your First Program In Go Programming Language Tutorial Online

      Go (a.k.a GoLang) is an open-source programming language that makes it easy to build simple, reliable, and efficient software. Go is gaining popularity, because of easy to use, concurrency mechanisms that get the most out of multicore and networked machines, Garbage collection, modular and flexible program structure, and more.

      If you have worked in C++ you will able to understand the syntax of Go. Some new ways to use for loop and did I mentioned that you can return 2 variables from a function instead of 1. It also uses pointers.

      As I have worked with GoLang and made APIs, it was quite easy and code was concise. If you want me to make videos more Go Programming Language Tutorial, comment below.

      Lets Begin

      Install Go on your system

      1. Download SDK from this link acc. to your OS.
      2. Set your environment variable up to <path>/Go/bin/, this path will be called as GOROOT
      3. Now the next steps are important, you need to create 1 more environment variables GOPATH
      4. Create a new folder in your desired location lets say, ~/Go, this path you will set as GOPATH, in this GOPATH you will make another folder with a name src ,
      5. Again make a folder in this srcwith a domain name as I have made navoki.com as a folder name, this folder will contain all your projects. Now within this Go folder, you will install all dependencies, Go will make folder here. These steps are necessary.
      6. You are ready to work with GO
      7. Now create main.go file in navoki.com write this code
      package main
      import "fmt"
      
      func main() {
      	fmt.Println("Hello, World!")
      }
      

      7. open Command Prompt window here and type

      C:\Users\TheDoctor\go\src\goprojects\hello>go run main.go
      Hello, World!
      

      And the output is printed.

      Explanation

      1. package main is a package declaration, every program should begin with this. Packages are Go’s way of organizing and reusing code
      2. import "fmt" , Package fmtimplements formatted I/O with functions analogous to C’s printfand scanf.
      3. main() is the starting point of your program.
      4. fmt.Println("Hello, World!"), obviously prints the data on the terminal
      5. and you don’t need ; in go

      Now you can experiment with other coding blocks like for loop,if-else, Lists, etc. if you need any tutorial for basic co basic core Go or APIs with GO, let me know in the comments below.

      Bookmark(0)

      Please login to bookmark

      Continue with Google
      0
      • Share:
      author avatar
      Shivam Srivastava

      Mobile Solution [email protected], Android and Flutter Dev, Dart ,Founder of @Navoki, Instructor

      Previous post

      Top Mobile Application Developer Tools 2020
      April 23, 2020

      Next post

      GitHub core features now free for everyone
      April 24, 2020

      You may also like

      Flutter Desktop Linux Snapcraft
      Linux Desktop app with Flutter | Publish on Snapcraft Tutorial
      4 August, 2021
      Embed-CodePen-with-Flutter-on-your-website
      Embed CodePen with Flutter on your website
      25 May, 2020
      Googl cpde search for different languages
      Google Provides Code Search for TensorFlow, Flutter, Dart, Angular, Go and more
      4 April, 2020

      Leave A Reply Cancel reply

      You must be logged in to post a comment.


      Categories

      • Android
      • Dart
      • Dart Server
      • Dart Web
      • Developers
      • Flutter
      • Flutter Desktop
      • Flutter Mobile
      • Flutter Web
      • Fuchsia
      • Go Lang
      • Technology
      • Uncategorized

      Recent Post

      • Everything-About-Flutter-3-In-Google-I-O-2022 Navoki.comEverything about Flutter 3 in Google I/O 2022
      • Flutter-Web-Cors-Error-Solved-Navoki.com[SOLVED] Flutter Web CORS Error
      • How Video Call Works In FlutterHow Incoming Video Call Notification works in Flutter

      Subscribe Now

       

      Recent Courses

      Single And Multi Selection Listview In Flutter

      Single and Multi Selection ListView in Flutter

      Go Installation And Variables

      Go Installation and Variables

      List In Dart Programming Language

      List in Dart Programming language

      Variables In Dart Programming Language

      Variables in Dart Programming language

      View All

      DON’T MISS
      FLUTTER UPDATES

      Be the first to know when our blog is published.

      flutter-mobile-mockup

      Check your inbox or spam folder to confirm your subscription.

      Contact

      •   Navoki Technologies Pvt. Ltd.
        JMD Megapolis , Sector 48, Gurugram, Haryana 122018

      Company

      • About Us
      • Blogs
      • Contact
      • Privacy policy
      • Terms & Condition

      Useful Links

      • Courses
      • Youtube
      • Dev News

      Mobile

      Click and Get started in seconds

      "Navoki" is a registered trademark of Navoki.com ® 2020–2030 Navoki Technologies Pvt Ltd.

      • Terms & Condition

      Login with your site account

      Continue with Google

      By "Sign in” above to accept Navoki’s Terms of Service & Privacy Policy.

      Not a member yet? Register now

      Register a new account

      Continue with Google

      By "Sign Up” above to accept Navoki’s Terms of Service & Privacy Policy.

      Are you a member? Login now