SlideShare a Scribd company logo
1 of 30
Golang Developer
 Go is a new programming language.
 Fast compilation times
 Statically-Typed Language
 Non-Object Oriented But ...
 Security
 Open Source
 Concurrent
 Simple
 Efficient and Productive
 powerful
 Design Start in 2007
 Released in 2009
 Designed and Support By GoogleCompany
 Designers: Robert Griesemer, Rob Pike, KenThompson
 Version 1.0 release in March 2012
 Development continues with an active community ...
 Web applications
 Server
 Command-line tools
 Games
 Scientific computing
 And etc....
 C language : Basic Syntax , Simple Structor
 Java : Inheritance via interface , Package Definitions
 C# language : Package Definitions
 JavaScript : Polymorphism Independent of Inheritance
 A combination of the above languages Is formed Go Programming
Language
 Google
 Iron.io
 Sound Cloud
 Canonical
 Heroku
 Carbon Games
 SmugMug
 Bitly
 Cloud
 Faster than PHP,Python, Perl,Node.js, Ruby,...
 A bit slower thanC, C++ and Java (sometimes faster than Java)
 SeeThis Link For Comparison:
 http://www.techempower.com/benchmarks/
 ...
 Linux
 BSD, OpenBSD
 Windows
 Mac OS
 Plan 9
 i386
 amd64
 arm
 IntelliJ
 SublimeText 2
 LiteIDE
 Intype
 NetBeans
 Eclipse
 Zeus
 and etc ...
 go command [arguments]
 Commands:
 build compile packages and dependencies
 clean remove object files
 doc run godoc on package sources
 fix run go tool fix on packages
 fmt run gofmt on package sources
 get download and install packages and dependencies
 install compile and install packages and dependencies
 list list packages
 run compile and run Go program
 test test packages
 vet run go tool vet on packages
 Example:
 go run hello.go
 package main
 import "fmt"
 func main() {
 fmt.Println("GolangTutorial")
 }
 Packages consists of one or more source file - lib (.go)
 package main
 Each SourceFile starts with a package
 package main
 import "fmt"
 func main() {
 fmt.Println("Golang Tutorial")
 }
 Import decleration is used to express a dependency on another package:
 import "fmt“
 packages are imported
 package main
 import "fmt"
 func main() {
 fmt.Println("Golang Tutorial")
 }
 OneLine:
 package main
 import "fmt"
 // this is a comment
 func main() {
 fmt.Println("HelloWorld")
 }
 MultiLine:
 package main
 import "fmt"
 /* this is a comment
 this is a multiline
 */
 func main() {
 fmt.Println("HelloWorld")
 }
 int
 bool
 string
 int int8 int16 int32 int64
 uint uint8 uint16 uint32 uint64 uintptr
 byte
 rune
 float32 float64
 complex64 complex128
 Type Conversion in Golang Is different
 package main
 import "fmt"
 func main(){
 var x float64 = 10.5
 var y int = int(x)
 fmt.Println(y)
 }
 Variables can store values
 var i int
 var f float64 = 1.5
 var b bool = true
 var s string = "golang"
 Shortcut :
 i := 10
 s := "Go-lang.ir"
 f := 1.5
 b := false
 Constants are declared like variables, but with the const keyword.
Constants can be character, string, boolean, or numeric values.
 package main
 import "fmt"
 const Pi = 3.14
 func main() {
 const World = "golang"
 fmt.Println("Hello",World)
 fmt.Println("Pi is:", Pi)
 const Check = true
 fmt.Println("Check ?", Check)
 }
 MultiValue in Array
 var list = […]int{1,2,3,4,5 }
 var list = [5]int{ 1,2,3,4,5 }
 list := […]int{1,2,3,4,5 }
 list := [5]int{ 1,2,3,4,5 }
 package main
 import "fmt"
 func main() {
 var a [2]string
 a[0] = "Hello"
 a[1] = "World"
 fmt.Println(a[0], a[1])
 fmt.Println(a)
 }
 A slice points to an array of values and also includes a length
 var list = []int{ 1, 2, 3 }
 var list = []string{ "foo", "bar", "zoo" }
 list := []int{ 1, 2, 3 }
 list := []string{ "foo", "bar", "zoo" }
 package main
 import "fmt"
 func main() {
 p := []int{2, 3, 5, 7, 11, 13}
 fmt.Println("p ==", p)
 for i := 0; i < len(p); i++ {
 fmt.Printf("p[%d] == %dn", i, p[i])
 }
 }
 M := map[string]string {}
 package main
 import "fmt"
 func main(){
 M := map[string]string {
 "x":"golang.org",
 "y":"go-lang.ir",
 }
 fmt.Println(M["x"],M["y"])
 }
 var M map[string]string
 M = make(map[string]string)
 package main
 import "fmt"
 var M map[string]string
 func main(){
 M := make(map[string]string)
 M = map[string]string {
 "x":"golang.org",
 "y":"go-lang.ir",
 }
 fmt.Println(M["x"],M["y"])
 }
 package main
 import "fmt"
 func main(){
 var a int = 2
 var b *int = &a
 a = 10
 fmt.Println(a, *b)
 }
 struct is a collection of fields
 typeTeacher struct {
 Name string
 Family string
 Tell string
 }
 package main
 import "fmt"
 typeTeacher struct {
 Name string
 Family string
 Tell string
 }
 func main() {
 T :=Teacher{Name: "Erfan", Family: "Akbarimanesh" ,Tell : "0571"}
 fmt.Println(T.Name,T.Family,T.Tell)
 }
 type Num int
 type Str string
 type MapType map[string]int
 package main
 import "fmt"
 type MapType map[string]int
 func main(){
 M := make(MapType)
 M = MapType {
 "x":10,
 "y":20,
 }
 fmt.Println(M["x"],M["y"])
 }

 package main
 import "fmt"
 func add(x int, y int) int {
 return x * y
 }
 func main() {
 fmt.Println(add(10, 2))
 }

 package main
 import "fmt"
 func Print_Value(x, y string) (string, string) {
 return y, x
 }
 func main() {
 a, b := Print_Value("golang", ".org")
 fmt.Println(a, b)
 }
Erfan Akbarimanesh
Golang Developer
 My Profile:
 Click Here
 Person Email:
 Mr.Akbarimanesh@gmail.com
 Work EMail:
 info@go-lang.ir
 Golang English:
 golang.org
 Golang Persian:
 go-lang.ir
 Package Documentation:
 golang.org/pkg
 Golang Document:
 golang.org/doc
Thank you

More Related Content

What's hot

Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in GoAmr Hassan
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on PythonSumit Raj
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1Lin Yo-An
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : PythonOpen Gurukul
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go ProgrammingLin Yo-An
 
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...Muhammad Ulhaque
 
Beauty and Power of Go
Beauty and Power of GoBeauty and Power of Go
Beauty and Power of GoFrank Müller
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutesSumit Raj
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...Maulik Borsaniya
 
Fantom - Programming Language for JVM, CLR, and Javascript
Fantom - Programming Language for JVM, CLR, and JavascriptFantom - Programming Language for JVM, CLR, and Javascript
Fantom - Programming Language for JVM, CLR, and JavascriptKamil Toman
 
Free Monads Getting Started
Free Monads Getting StartedFree Monads Getting Started
Free Monads Getting StartedKent Ohashi
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersAlessandro Sanino
 
Introduction to Clime
Introduction to ClimeIntroduction to Clime
Introduction to ClimeMosky Liu
 
OpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpen Gurukul
 
Programming with Python - Adv.
Programming with Python - Adv.Programming with Python - Adv.
Programming with Python - Adv.Mosky Liu
 
Python in 30 minutes!
Python in 30 minutes!Python in 30 minutes!
Python in 30 minutes!Fariz Darari
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
 
Hacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 AutumnHacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 AutumnMoriyoshi Koizumi
 

What's hot (20)

Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in Go
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : Python
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go Programming
 
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
 
Beauty and Power of Go
Beauty and Power of GoBeauty and Power of Go
Beauty and Power of Go
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
 
Fantom - Programming Language for JVM, CLR, and Javascript
Fantom - Programming Language for JVM, CLR, and JavascriptFantom - Programming Language for JVM, CLR, and Javascript
Fantom - Programming Language for JVM, CLR, and Javascript
 
Free Monads Getting Started
Free Monads Getting StartedFree Monads Getting Started
Free Monads Getting Started
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to Gophers
 
Introduction to Clime
Introduction to ClimeIntroduction to Clime
Introduction to Clime
 
OpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ Programming
 
MP in Clojure
MP in ClojureMP in Clojure
MP in Clojure
 
Programming with Python - Adv.
Programming with Python - Adv.Programming with Python - Adv.
Programming with Python - Adv.
 
Python in 30 minutes!
Python in 30 minutes!Python in 30 minutes!
Python in 30 minutes!
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
 
Hacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 AutumnHacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 Autumn
 

Viewers also liked

Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to GoOliver N
 
Socket Programming In Python
Socket Programming In PythonSocket Programming In Python
Socket Programming In Pythondidip
 
Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQLPeter Eisentraut
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - BasicMosky Liu
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using GolangSeongJae Park
 
Functional programming in Python
Functional programming in PythonFunctional programming in Python
Functional programming in PythonColin Su
 

Viewers also liked (8)

Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to Go
 
Socket Programming In Python
Socket Programming In PythonSocket Programming In Python
Socket Programming In Python
 
Golang
GolangGolang
Golang
 
Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQL
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 
Functional programming in Python
Functional programming in PythonFunctional programming in Python
Functional programming in Python
 

Similar to Golang iran - tutorial go programming language - Preliminary

Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
Go serving: Building server app with go
Go serving: Building server app with goGo serving: Building server app with go
Go serving: Building server app with goHean Hong Leong
 
10〜30分で何となく分かるGo
10〜30分で何となく分かるGo10〜30分で何となく分かるGo
10〜30分で何となく分かるGoMoriyoshi Koizumi
 
Go programming introduction
Go programming introductionGo programming introduction
Go programming introductionGinto Joseph
 
Coding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMCoding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMRaveen Perera
 
Geeks Anonymes - Le langage Go
Geeks Anonymes - Le langage GoGeeks Anonymes - Le langage Go
Geeks Anonymes - Le langage GoGeeks Anonymes
 
Golang 101
Golang 101Golang 101
Golang 101宇 傅
 
Something about Golang
Something about GolangSomething about Golang
Something about GolangAnton Arhipov
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Yuren Ju
 
Python-GTK
Python-GTKPython-GTK
Python-GTKYuren Ju
 
Learning go for perl programmers
Learning go for perl programmersLearning go for perl programmers
Learning go for perl programmersFred Moyer
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my dayTor Ivry
 

Similar to Golang iran - tutorial go programming language - Preliminary (20)

Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
Go serving: Building server app with go
Go serving: Building server app with goGo serving: Building server app with go
Go serving: Building server app with go
 
Let's golang
Let's golangLet's golang
Let's golang
 
10〜30分で何となく分かるGo
10〜30分で何となく分かるGo10〜30分で何となく分かるGo
10〜30分で何となく分かるGo
 
Go programming introduction
Go programming introductionGo programming introduction
Go programming introduction
 
Coding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMCoding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBM
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Geeks Anonymes - Le langage Go
Geeks Anonymes - Le langage GoGeeks Anonymes - Le langage Go
Geeks Anonymes - Le langage Go
 
Golang 101
Golang 101Golang 101
Golang 101
 
Introduction to Go for Java Programmers
Introduction to Go for Java ProgrammersIntroduction to Go for Java Programmers
Introduction to Go for Java Programmers
 
Something about Golang
Something about GolangSomething about Golang
Something about Golang
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
 
Hello Go
Hello GoHello Go
Hello Go
 
A Tour of Go - Workshop
A Tour of Go - WorkshopA Tour of Go - Workshop
A Tour of Go - Workshop
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
Go introduction
Go   introductionGo   introduction
Go introduction
 
Learning go for perl programmers
Learning go for perl programmersLearning go for perl programmers
Learning go for perl programmers
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 

Recently uploaded

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 

Recently uploaded (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Golang iran - tutorial go programming language - Preliminary

  • 2.  Go is a new programming language.  Fast compilation times  Statically-Typed Language  Non-Object Oriented But ...  Security  Open Source  Concurrent  Simple  Efficient and Productive  powerful
  • 3.  Design Start in 2007  Released in 2009  Designed and Support By GoogleCompany  Designers: Robert Griesemer, Rob Pike, KenThompson  Version 1.0 release in March 2012  Development continues with an active community ...
  • 4.  Web applications  Server  Command-line tools  Games  Scientific computing  And etc....
  • 5.  C language : Basic Syntax , Simple Structor  Java : Inheritance via interface , Package Definitions  C# language : Package Definitions  JavaScript : Polymorphism Independent of Inheritance  A combination of the above languages Is formed Go Programming Language
  • 6.  Google  Iron.io  Sound Cloud  Canonical  Heroku  Carbon Games  SmugMug  Bitly  Cloud
  • 7.  Faster than PHP,Python, Perl,Node.js, Ruby,...  A bit slower thanC, C++ and Java (sometimes faster than Java)  SeeThis Link For Comparison:  http://www.techempower.com/benchmarks/  ...
  • 8.  Linux  BSD, OpenBSD  Windows  Mac OS  Plan 9
  • 10.  IntelliJ  SublimeText 2  LiteIDE  Intype  NetBeans  Eclipse  Zeus  and etc ...
  • 11.  go command [arguments]  Commands:  build compile packages and dependencies  clean remove object files  doc run godoc on package sources  fix run go tool fix on packages  fmt run gofmt on package sources  get download and install packages and dependencies  install compile and install packages and dependencies  list list packages  run compile and run Go program  test test packages  vet run go tool vet on packages  Example:  go run hello.go
  • 12.  package main  import "fmt"  func main() {  fmt.Println("GolangTutorial")  }
  • 13.  Packages consists of one or more source file - lib (.go)  package main  Each SourceFile starts with a package  package main  import "fmt"  func main() {  fmt.Println("Golang Tutorial")  }
  • 14.  Import decleration is used to express a dependency on another package:  import "fmt“  packages are imported  package main  import "fmt"  func main() {  fmt.Println("Golang Tutorial")  }
  • 15.  OneLine:  package main  import "fmt"  // this is a comment  func main() {  fmt.Println("HelloWorld")  }  MultiLine:  package main  import "fmt"  /* this is a comment  this is a multiline  */  func main() {  fmt.Println("HelloWorld")  }
  • 16.  int  bool  string  int int8 int16 int32 int64  uint uint8 uint16 uint32 uint64 uintptr  byte  rune  float32 float64  complex64 complex128
  • 17.  Type Conversion in Golang Is different  package main  import "fmt"  func main(){  var x float64 = 10.5  var y int = int(x)  fmt.Println(y)  }
  • 18.  Variables can store values  var i int  var f float64 = 1.5  var b bool = true  var s string = "golang"  Shortcut :  i := 10  s := "Go-lang.ir"  f := 1.5  b := false
  • 19.  Constants are declared like variables, but with the const keyword. Constants can be character, string, boolean, or numeric values.  package main  import "fmt"  const Pi = 3.14  func main() {  const World = "golang"  fmt.Println("Hello",World)  fmt.Println("Pi is:", Pi)  const Check = true  fmt.Println("Check ?", Check)  }
  • 20.  MultiValue in Array  var list = […]int{1,2,3,4,5 }  var list = [5]int{ 1,2,3,4,5 }  list := […]int{1,2,3,4,5 }  list := [5]int{ 1,2,3,4,5 }  package main  import "fmt"  func main() {  var a [2]string  a[0] = "Hello"  a[1] = "World"  fmt.Println(a[0], a[1])  fmt.Println(a)  }
  • 21.  A slice points to an array of values and also includes a length  var list = []int{ 1, 2, 3 }  var list = []string{ "foo", "bar", "zoo" }  list := []int{ 1, 2, 3 }  list := []string{ "foo", "bar", "zoo" }  package main  import "fmt"  func main() {  p := []int{2, 3, 5, 7, 11, 13}  fmt.Println("p ==", p)  for i := 0; i < len(p); i++ {  fmt.Printf("p[%d] == %dn", i, p[i])  }  }
  • 22.  M := map[string]string {}  package main  import "fmt"  func main(){  M := map[string]string {  "x":"golang.org",  "y":"go-lang.ir",  }  fmt.Println(M["x"],M["y"])  }
  • 23.  var M map[string]string  M = make(map[string]string)  package main  import "fmt"  var M map[string]string  func main(){  M := make(map[string]string)  M = map[string]string {  "x":"golang.org",  "y":"go-lang.ir",  }  fmt.Println(M["x"],M["y"])  }
  • 24.  package main  import "fmt"  func main(){  var a int = 2  var b *int = &a  a = 10  fmt.Println(a, *b)  }
  • 25.  struct is a collection of fields  typeTeacher struct {  Name string  Family string  Tell string  }  package main  import "fmt"  typeTeacher struct {  Name string  Family string  Tell string  }  func main() {  T :=Teacher{Name: "Erfan", Family: "Akbarimanesh" ,Tell : "0571"}  fmt.Println(T.Name,T.Family,T.Tell)  }
  • 26.  type Num int  type Str string  type MapType map[string]int  package main  import "fmt"  type MapType map[string]int  func main(){  M := make(MapType)  M = MapType {  "x":10,  "y":20,  }  fmt.Println(M["x"],M["y"])  } 
  • 27.  package main  import "fmt"  func add(x int, y int) int {  return x * y  }  func main() {  fmt.Println(add(10, 2))  } 
  • 28.  package main  import "fmt"  func Print_Value(x, y string) (string, string) {  return y, x  }  func main() {  a, b := Print_Value("golang", ".org")  fmt.Println(a, b)  }
  • 29. Erfan Akbarimanesh Golang Developer  My Profile:  Click Here  Person Email:  Mr.Akbarimanesh@gmail.com  Work EMail:  info@go-lang.ir
  • 30.  Golang English:  golang.org  Golang Persian:  go-lang.ir  Package Documentation:  golang.org/pkg  Golang Document:  golang.org/doc Thank you