Movatterモバイル変換


[0]ホーム

URL:


go-lang, profile picture
Uploaded bygo-lang
PPTX, PDF2,187 views

Golang iran - tutorial go programming language - Preliminary

Golang, developed by Google, is a fast, statically-typed programming language released in 2009, known for its simplicity, efficiency, and support for concurrent programming. It offers unique features like a combination of syntax from C, Java, and JavaScript while being open source and fostering an active community. The language supports diverse applications, including web development, scientific computing, and more, with a variety of libraries and tools available.

Embed presentation

Downloaded 68 times
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 ProgrammingLanguage
 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 AkbarimaneshGolang 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/docThank you

Recommended

PDF
Go Lang Tutorial
PDF
Introduction to Go programming language
PPTX
Go Programming Language (Golang)
PDF
Golang and Eco-System Introduction / Overview
PPTX
Go Language Hands-on Workshop Material
PDF
FTD JVM Internals
PDF
Introduction to go language programming
PPTX
EuroPython 2016 - Do I Need To Switch To Golang
PPTX
Go. Why it goes
PDF
Introduction to Programming in Go
ODP
Hands on Session on Python
PDF
Happy Go Programming Part 1
ODP
OpenGurukul : Language : Python
PDF
Happy Go Programming
PDF
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
KEY
Beauty and Power of Go
ODP
An Intro to Python in 30 minutes
PPTX
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PDF
Fantom - Programming Language for JVM, CLR, and Javascript
PDF
Free Monads Getting Started
PPTX
The GO Language : From Beginners to Gophers
PDF
Introduction to Clime
ODP
OpenGurukul : Language : C++ Programming
PDF
MP in Clojure
PDF
Programming with Python - Adv.
PPTX
Python in 30 minutes!
PDF
PyCon 2013 : Scripting to PyPi to GitHub and More
PPTX
Hacking Go Compiler Internals / GoCon 2014 Autumn
PDF
Golang #5: To Go or not to Go
PDF
Socket Programming In Python
 

More Related Content

PDF
Go Lang Tutorial
PDF
Introduction to Go programming language
PPTX
Go Programming Language (Golang)
PDF
Golang and Eco-System Introduction / Overview
PPTX
Go Language Hands-on Workshop Material
PDF
FTD JVM Internals
PDF
Introduction to go language programming
PPTX
EuroPython 2016 - Do I Need To Switch To Golang
Go Lang Tutorial
Introduction to Go programming language
Go Programming Language (Golang)
Golang and Eco-System Introduction / Overview
Go Language Hands-on Workshop Material
FTD JVM Internals
Introduction to go language programming
EuroPython 2016 - Do I Need To Switch To Golang

What's hot

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

Viewers also liked

PDF
Golang #5: To Go or not to Go
PDF
Socket Programming In Python
 
PDF
Golang
PDF
Programming with Python and PostgreSQL
PDF
Programming with Python - Basic
PPTX
Write microservice in golang
PDF
Develop Android app using Golang
PDF
Functional programming in Python
Golang #5: To Go or not to Go
Socket Programming In Python
 
Golang
Programming with Python and PostgreSQL
Programming with Python - Basic
Write microservice in golang
Develop Android app using Golang
Functional programming in Python

Similar to Golang iran - tutorial go programming language - Preliminary

PPTX
Golang basics for Java developers - Part 1
PDF
Lecture 1 - Overview of Go Language 1.pdf
PPTX
Introduction to Go
PPTX
Golang - Overview of Go (golang) Language
PDF
Golang workshop
PPTX
Should i Go there
PDF
Go_ Get iT! .pdf
PDF
Go Java, Go!
PPTX
Go Java, Go!
PDF
Go Java, Go!
PDF
Go Programming by Example_ Nho Vĩnh Share.pdf
PPTX
Golang introduction
PPTX
Lab1GoBasicswithgo_foundationofgolang.pptx
PDF
golang_refcard.pdf
 
PPT
GO programming language
PDF
Go 1.10 Release Party - PDX Go
PPTX
Next Generation Language Go
PDF
A quick introduction to go
PPTX
The Go Programing Language 1
PDF
Golang online course
Golang basics for Java developers - Part 1
Lecture 1 - Overview of Go Language 1.pdf
Introduction to Go
Golang - Overview of Go (golang) Language
Golang workshop
Should i Go there
Go_ Get iT! .pdf
Go Java, Go!
Go Java, Go!
Go Java, Go!
Go Programming by Example_ Nho Vĩnh Share.pdf
Golang introduction
Lab1GoBasicswithgo_foundationofgolang.pptx
golang_refcard.pdf
 
GO programming language
Go 1.10 Release Party - PDX Go
Next Generation Language Go
A quick introduction to go
The Go Programing Language 1
Golang online course

Recently uploaded

PDF
1ST APPLICATION FOR ANNULMENT (4)8787666.pdf
PDF
FAMILY ASSESSMENT FORMAT - CHN practical
PDF
All Students Workshop 25 Yoga Wellness by LDMMIA
PDF
Projecte de la porta de la classe de primer A: Mar i cel.
PPTX
How to Manage Reception Report in Odoo 18 Inventory
PPTX
How to Manage Line Discounts in Odoo 18 POS
PDF
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...
PDF
Ketogenic diet in Epilepsy in children..
PDF
Blue / Green: Troop Leading Procedure (TLP) Overview.pdf
PPTX
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
PPTX
Pig- piggy bank in Big Data Analytics.ppt.pptx
PPTX
Limpitlaw "Licensing: From Mindset to Milestones"
PPTX
York "Collaboration for Research Support at U-M Library"
PPTX
Semester 6 UNIT 2 Dislocation of hip.pptx
PDF
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
DOCX
Mobile applications Devlopment ReTest year 2025-2026
PDF
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
PPTX
Details of Muscular-and-Nervous-Tissues.pptx
PDF
The Pity of War: Form, Fragment, and the Artificial Echo | Understanding War ...
PDF
APM Wessex Network: DEIB Policy into Practice
1ST APPLICATION FOR ANNULMENT (4)8787666.pdf
FAMILY ASSESSMENT FORMAT - CHN practical
All Students Workshop 25 Yoga Wellness by LDMMIA
Projecte de la porta de la classe de primer A: Mar i cel.
How to Manage Reception Report in Odoo 18 Inventory
How to Manage Line Discounts in Odoo 18 POS
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...
Ketogenic diet in Epilepsy in children..
Blue / Green: Troop Leading Procedure (TLP) Overview.pdf
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
Pig- piggy bank in Big Data Analytics.ppt.pptx
Limpitlaw "Licensing: From Mindset to Milestones"
York "Collaboration for Research Support at U-M Library"
Semester 6 UNIT 2 Dislocation of hip.pptx
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
Mobile applications Devlopment ReTest year 2025-2026
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
Details of Muscular-and-Nervous-Tissues.pptx
The Pity of War: Form, Fragment, and the Artificial Echo | Understanding War ...
APM Wessex Network: DEIB Policy into Practice

Golang iran - tutorial go programming language - Preliminary

  • 1.
  • 2.
     Go isa new programming language. Fast compilation times Statically-Typed Language Non-Object Oriented But ... Security Open Source Concurrent Simple Efficient and Productive powerful
  • 3.
     Design Startin 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 ProgrammingLanguage
  • 6.
     Google Iron.ioSound Cloud Canonical Heroku Carbon Games SmugMug Bitly Cloud
  • 7.
     Faster thanPHP,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
  • 9.
  • 10.
     IntelliJ SublimeText2 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 consistsof 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 declerationis 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: packagemain 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 Conversionin Golang Is different package main import "fmt" func main(){ var x float64 = 10.5 var y int = int(x) fmt.Println(y) }
  • 18.
     Variables canstore 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 aredeclared 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 inArray 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 slicepoints 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 Mmap[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 isa 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 Numint 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 AkbarimaneshGolang 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/docThank you

[8]ページ先頭

©2009-2025 Movatter.jp