您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Go Programming
  所属分类: 专业指导
  开发工具:
  文件大小: 4mb
  下载次数: 0
  上传时间: 2012-06-26
  提 供 者: kuku*****
 详细说明: TABLE OF CONTENTS What is This Book About and Who is It For? ..................... 6 About the Author ................................................................. 8 1.1 Why a New Language? ............................................... 10 1.2 How Does Go Compare with C++? ............................ 10 1.2.1 Functions ............................................................. 11 1.2.2 Is Go Object Oriented like C++? ........................ 12 1.2.3 How do I free memory in Go? ............................ 14 1.2.4 Othe r stuff to be aware of .................................... 14 1.3 Summary ..................................................................... 16 2.1 What Platforms can I install Go on? ........................... 17 2.2 But what if I'm a Windows user? ............................... 18 2.2.1 Virtual Machine ................................................... 19 2.2.2 Dual Booting with Ubuntu ................................... 20 2.3 Installing Go ................................................................ 22 2.3.1 Environment Variables ........................................ 23 2.3.2 Installing Mercurial.. ............................................ 24 2.3.3 Fetching the Go Repository ................................. 27 2.3.4 Installing Go ......................................................... 27 2.4 Compiling, Linking, and Running .............................. 28 2.4.1 What About gccgo? .............................................. 29 2.5 Summary ..................................................................... 30 3.1 Standard 1/0 ................................................................ 33 3.1.1 The Obligatory "Hello World" ............................ 33 3.1.2 Retrieving Input from the User ............................ 35 3.2 File 1/0 ........................................................................ 38 3.2.1 Output to a File .................................................... 38 3.2.2 Input from a File .................................................. 43 3.2.3 A Short Summary of Permissions ........................ 47 3.3 Constants and Variables .............................................. 50 3.3.1 Identifiers ............................................................. 50 3.3.2 Constants .............................................................. 51 3.3.3 Variables .............................................................. 53 3.3.4 Time Savers : Short Declarations and Distributing .............. , ......................................................................... 55 3.4 Some Basic Data Types .............................................. 57 3.4.1 Numeric Data Types ............................................ 57 3.4.2 Character Data Type ............................................ 60 3.4.3 Boolean Data Type .............................................. 62 3.5 The String Data Type .................................................. 63 3.5.1 The strings Package ............................................. 65 Prefixes and Suffixes ................................................. 66 Counting Occurrences of a Substring ........................ 68 Index and Lastindex ................................................... 71 Repeat ........................................................................ 73 ToUpper and ToLower .............................................. 74 3.5 .2 The strconv Package ............................................ 7 6 3.6 Keywords and Operators ............................................. 78 3.6.1 Keywords ............................................................. 78 3.6.2 Operators .............................................................. 79 3.7 Summary ..................................................................... 80 4.1 Conditional Structures ................................................ 81 4.1.1 Basics of Logic .................................................... 82 Equality ...................................................................... 82 AND operator ............................................................. 82 OR operator ................................................................ 83 NOT operator ............................................................. 83 4.1.2 The if Structure .................................................... 83 4.1.3 The switch Structure ............................................ 87 4.2 Iteration ....................................................................... 92 4.3 break, continue, and Labels ........................................ 95 4.3.1 continue ................................................................ 95 4.3.2 break ..................................................................... 97 4.3.3 Labe1s ................................................................... 98 4.4 Functions ..................................................................... 99 4.4.1 Single Return Value ........................................... 1 00 4.4.2 Multiple Return Values .................................... 1 02 Result Parameters ..................................................... 1 05 Empty Return ........................................................... 1 05 4.4.3 The defer Keyword .......................................... 1 06 4.4.4 The Blank Identifier .......................................... 1 08 4.4.5 Example : Minimum I Maximum Function ....... 1 09 4.4 Summary ................................................................... 110 5.1 Pointers and References ............................................ 112 5.2 Arrays and Slices ...................................................... 114 5.2.1 Arrays ................................................................. 115 5.2.2 Slices .................................................................. 119 Basic Usage .............................................................. 120 Using make() to Create a Slice ................................ 122 Reslicing .................................................................. 123 5.3 Maps .......................................................................... 125 Testing for Existence of an Element. ....................... 128 Deleting an Element. ................................................ 128 5.4 Using range with for Loops ...................................... 130 5.5 Simulating Enumerated Types with iota ................... 133 5.6 Summary ................................................................... 134 6.1 Structured Types ....................................................... 136 6.1.1 Named Fields and Anonymous Fields ............... 136 6.1.2 Methods .............................................................. 140 6.2 Custom Packages and Visibility ............................... 143 6.2.1 Visibility ............................................................ 144 6.3 Interfaces ................................................................... 14 7 6.4 Summary ................................................................... 151 7.1 Concurrency .............................................................. 153 7 .1.1 Goroutines .......................................................... 153 7.2 Communication Channels ......................................... 156 7.2.1 The Communication Operator, <-...................... 157 7 .2.2 Communicability and Select Statements ........... 161 7.3 A Simple Client and Server ...................................... 163 7.4 Summary ................................................................... 169 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: go 编程 golang
 输入关键字,在本站1000多万海量源码库中尽情搜索: