Wednesday 1 May 2019

go language tutorial

      Introduction Go Language
      Install and setup Go
      Go: Hello World Application
      Go language: Build executable
      Go: Primitive Data Types
      Go language: Print value and type of a variable
      Initialize multiple variables in one line
      = : Short Assignment statement
      Default or zero value
      Constants
      iota identifier
      Type Conversion
      Type Inference
      strings
      Concatenate strings
      multi line strings
      Arrays
      Arrays are passed by value
      Slices
      Get capacity of the slice
      Get number of elements in the slice
      Arrays vs slices
      Slices are passed by reference
      Iterate over a slice using range keyword
      Get slice from a slice
      _ symbol
      Append an element to a slice
      Map data structure
      Define map using literal notation
      Get number of items in a map
      Check whether an item exists in map or not
      Delete item from the map
      Print all the keys of map
      Print key, value from map
      if statement
      if-else statement
      if statement: combine initialisation and condition evaluation in same line
      switch statement
      switch without an expression
      for loop
      Use for loop as while loop
      Print elements of array
      Iterate over a map
      Read data from console or user
      Create a function
      Pass by Reference
      Variadic Functions
      Return a value from function
      Anonymous functions
      Functions continued
      return Error from a function
      Structs
      Construct an object to a structure using &
      struct literal notation
      constructor functions
      Adding Methods to a struct
      Interfaces
      Importing multiple packages
      defer the function execution
      Pointers
      Structure pointers
       Read content type from a url
      Exit the program with given status code
      Goroutines

Previous                                                 Next                                                 Home

No comments:

Post a Comment