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

More Related Content

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

What's hot

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

Viewers also liked

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

Similar to Golang iran - tutorial go programming language - Preliminary

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

Recently uploaded

PPTX
Details of Muscular-and-Nervous-Tissues.pptx
PPTX
How to Manage Package Reservation in Odoo 18 Inventory
PDF
M.Sc. Nonchordates Complete Syllabus PPT | All Important Topics Covered
PDF
Toward Massive, Ultrareliable, and Low-Latency Wireless Communication With Sh...
PPTX
Details of Epithelial and Connective Tissue.pptx
PDF
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
PDF
DHA/HAAD/MOH/DOH OPTOMETRY MCQ PYQ. .pdf
PDF
Projecte de la porta de la classe de primer A: Mar i cel.
PDF
The Tale of Melon City poem ppt by Sahasra
PDF
Analyzing the data of your initial survey
PDF
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...
PDF
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
PPTX
Accounting Skills Paper-II (Registers of PACs and Credit Co-operative Societies)
PPTX
The Cell & Cell Cycle-detailed structure and function of organelles.pptx
PDF
NAVIGATE PHARMACY CAREER OPPORTUNITIES.pdf
PPTX
extracting significant information to formulate sound judgement
PPTX
PURPOSIVE SAMPLING IN EDUCATIONAL RESEARCH RACHITHRA RK.pptx
PPTX
York "Collaboration for Research Support at U-M Library"
PPTX
ICH Harmonization A Global Pathway to Unified Drug Regulation.pptx
PPTX
Cost of Capital - Cost of Equity, Cost of debenture, Cost of Preference share...
Details of Muscular-and-Nervous-Tissues.pptx
How to Manage Package Reservation in Odoo 18 Inventory
M.Sc. Nonchordates Complete Syllabus PPT | All Important Topics Covered
Toward Massive, Ultrareliable, and Low-Latency Wireless Communication With Sh...
Details of Epithelial and Connective Tissue.pptx
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
DHA/HAAD/MOH/DOH OPTOMETRY MCQ PYQ. .pdf
Projecte de la porta de la classe de primer A: Mar i cel.
The Tale of Melon City poem ppt by Sahasra
Analyzing the data of your initial survey
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
Accounting Skills Paper-II (Registers of PACs and Credit Co-operative Societies)
The Cell & Cell Cycle-detailed structure and function of organelles.pptx
NAVIGATE PHARMACY CAREER OPPORTUNITIES.pdf
extracting significant information to formulate sound judgement
PURPOSIVE SAMPLING IN EDUCATIONAL RESEARCH RACHITHRA RK.pptx
York "Collaboration for Research Support at U-M Library"
ICH Harmonization A Global Pathway to Unified Drug Regulation.pptx
Cost of Capital - Cost of Equity, Cost of debenture, Cost of Preference share...

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