An Introduction to Programming in Go

An Introduction to Programming in Go

ID:40878523

大小:2.76 MB

页数:165页

时间:2019-08-09

An Introduction to Programming in Go_第1页
An Introduction to Programming in Go_第2页
An Introduction to Programming in Go_第3页
An Introduction to Programming in Go_第4页
An Introduction to Programming in Go_第5页
资源描述:

《An Introduction to Programming in Go》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、AnIntroductiontoProgramminginGoCopyright©2012byCalebDoxseyAllrightsreserved.Nopartofthisbookmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,includingphotocopying,recording,orbyanyinformationstorageandretrievalsystemwithoutthewrittenpermiss

2、ionoftheauthor,exceptwherepermittedbylaw.ISBN:978-1478355823CoverartbyAbigailDoxseyAnderson.PortionsofthistextarereproducedfromworkcreatedandsharedbyGoogleandusedaccordingtotermsdescribedintheCreativeCommons3.0AttributionLicense.Contents1GettingStarted11.1Filesand

3、Folders21.2TheTerminal51.3TextEditors91.4GoTools132YourFirstProgram152.1HowtoReadaGoProgram173Types233.1Numbers243.2Strings293.3Booleans314Variables354.1HowtoNameaVariable394.2Scope404.3Constants434.4DefiningMultipleVariables444.5AnExampleProgram455ControlStructur

4、es475.1For485.2If515.3Switch556Arrays,SlicesandMaps586.1Arrays586.2Slices646.3Maps677Functions767.1YourSecondFunction777.2ReturningMultipleValues827.3VariadicFunctions827.4Closure847.5Recursion867.6Defer,Panic&Recover888Pointers928.1The*and&operators938.2new949Str

5、uctsandInterfaces979.1Structs989.2Methods1019.3Interfaces10410Concurrency10810.1Goroutines10810.2Channels11111Packages12011.1CreatingPackages12111.2Documentation12412Testing12713TheCorePackages13213.1Strings13213.2Input/Output13413.3Files&Folders13513.4Errors14013

6、.5Containers&Sort14113.6Hashes&Cryptography14413.7Servers14713.8ParsingCommandLineArguments15513.9SynchronizationPrimitives15614NextSteps15914.1StudytheMasters15914.2MakeSomething16014.3TeamUp1611GettingStartedComputerprogrammingistheart,craftandscienceofwritingpr

7、ogramswhichdefinehowcomputersoperate.Thisbookwillteachyouhowtowritecomputerpro-gramsusingaprogramminglanguagedesignedbyGooglenamedGo.Goisageneralpurposeprogramminglanguagewithadvancedfeaturesandacleansyntax.Becauseofitswideavailabilityonavarietyofplatforms,itsrobu

8、stwell-documentedcommonlibrary,anditsfocusongoodsoftwareengineeringprinciples,Goisanideallanguagetolearnasyourfirstprogramminglanguage.Theprocessweuseto

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。