[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-692241-105":59,"doc-detail-692241-en":131,"doc-similar-692241":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","a-tour-of-go","A Tour of Go","","A fast-paced four-session tutorial introducing Go’s core language constructs and practical programming workflow. It guides learners through installing Go, building and running sample code, and using the goplay environment for interactive experiments. Sessions cover program construction essentials, compilation of binaries with make, and hands-on exercises on loops and functions (Newton’s method Sqrt), maps (WordCount web server), and slices (image rendering via grayscale).",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/a-tour-of-go/692241/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/a-tour-of-go/692241.png","ImageObject",300,407,{"name":92,"@type":93},"AfterMidnight","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-11-09",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",12,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What is the overall structure of the Go tutorial?","Question",{"text":113,"@type":114},"The course is organized as four 90-minute hands-on sessions. Each session includes exercises, with early exercises covering the most important lessons.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How do you run the interactive hello-world program in this tutorial?",{"text":118,"@type":114},"Start goplay in a terminal and open the provided localhost URL to view the hello, world example. Compile and run it using Shift-Enter.",{"name":120,"@type":111,"acceptedAnswer":121},"What coding exercises are included in Session 1?",{"text":122,"@type":114},"Session 1 includes exercises for implementing Sqrt with Newton’s method, creating a WordCount map function and serving it via an HTTP server, and writing a Pic function that renders slice data as grayscale pixels.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},692241,1794186700,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":36,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":130,"read_time":144,"preview_page_count":19,"preview_urls":145},962090896061,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","A Tour of Go  \nRuss Cox  \n[rsc@golang.org](rsc@golang.org)  \n[http://golang.org/](http://golang.org/)  \nUSENIX 2010  \nGo is a new, experimental, concurrent, garbage-collected programming language developed at Google over the last two years and open sourced in November 2009 . It aims to combine the speed and safety of a static language like Cor Java with the flexibility and agility of a dynamic language like Python or JavaScript. It is intended to serve as a convenient, lightweight, fast language, especially for writing concurrent systems software such as Web servers and distributed systems.  \nThe tutorial today is a fast-paced tour of Go. There’s no way we could cover everything about Go in one day, and we’re not even going to try. Instead, we’ll cover a few basics and then start writing real programs that do interesting things. More advanced aspects of the language will have to be left for you to explore on your own once we’redone here. A good jumping off point would be Effective Go, linked at [http://golang.org/](http://golang.org/ and)[ and](http://golang.org/ and) included at the end of this packet.  \nToday is structured as four 90-minute sessions, culminating in a room-wide file distribution system, a baby BitTorrent. Those sessions will all be hands on, with you coding for at least an hour in each. There are a series of exercises in each session, more than you’ll have time to do. The first few convey the most important lessons; therest typically cover more advanced tangents. If you don’t get to them today, you might find them interesting to attack later.  \n* This content is licensed under Creative Commons Attribution 3.0.  \nSession 1 . Nuts and Bolts  \nThis session introduces the basics of Go program construction. At the end you should be able to write programs that import packages, define functions, call functions, iterate, and use simple data structures.  \nInstallation  \nEveryone here should already have a laptop with Go installed. If you need to install Go, visit [http://golang.org/doc/install.html](http://golang.org/doc/install.html. The)[. The](http://golang.org/doc/install.html. The) short version is:  \nhg clone −r release [https://go.googlecode.com/hg](https://go.googlecode.com/hg) go  \nexport GOROOT=$(pwd)/go  \nexport GOARCH=386 \\# or amd64  \nexport GOOS=linux \\# or freebsd or darwin  \nexport GOBIN=$HOME/bin \\# somewhere writable in your $PATH  \ncd $GOROOT/src  \n./all.bash  \nIf you don’t have Mercurial (hg) installed, [http://swtch.com/usenix/go.tgz](http://swtch.com/usenix/go.tgz is a checked out)[ is a checked out](http://swtch.com/usenix/go.tgz is a checked out) tree.  \nCourse Materials  \nWe’re going to write a few programs today with the help of some library code. To install:  \ncd $GOROOT  \ncurl [http://swtch.com/usenix/tour.tgz | gunzip | tar](http://swtch.com/usenix/tour.tgz | gunzip | tar) xf −  \ncd tour  \nmake install  \nCode  \nNow we’re ready to write some code. The installation of the tour files installed a program called goplay which you can use to play with toy programs interactively. To run it, start goplay in a terminal window and then visit [http://localhost:3999/](http://localhost:3999/. You)[. You](http://localhost:3999/. You)’ll see a simple hello, world program. Type Shift-Enter to compile and run it. As we examine Go’s basic constructs, you might find this a nice, simple way to experiment.  \nCompiling binaries  \nEventually you’ll want to compile a real binary instead of using goplay. The directory $GOROOT/tour/code has a Makefile that will build the program hello if you write hello.go (for any value of hello) . If you haven’t already, write a simple ‘‘hello, world’’ program just to get started.  \ncd $GOROOT/tour/code  \nmake hello  \n./hello As a shorthand,  \nmake [hello. run](hello. run)[ ](hello. run)builds and runs hello.  \nExercise: Loops and functions  \nAs a simple way to play with functions and loops, implement the square root function using Newton’s method. Your function should have the si","cbCaifO27pusQnfY","https://ap.wps.com/l/cbCaifO27pusQnfY","pdf",314719,"English","# Session 1 - Nuts and Bolts\n## Installation\n## Course Materials and goplay\n## Compiling binaries and running hello\n## Exercise: Loops and functions (Sqrt)\n## Exercise: Maps (WordCount)\n## Exercise: Slices (Pic)\n## Advanced Exercise: Complex cube roots","[{\"question\":\"What is the overall structure of the Go tutorial?\",\"answer\":\"The course is organized as four 90-minute hands-on sessions. Each session includes exercises, with early exercises covering the most important lessons.\"},{\"question\":\"How do you run the interactive hello-world program in this tutorial?\",\"answer\":\"Start goplay in a terminal and open the provided localhost URL to view the hello, world example. Compile and run it using Shift-Enter.\"},{\"question\":\"What coding exercises are included in Session 1?\",\"answer\":\"Session 1 includes exercises for implementing Sqrt with Newton’s method, creating a WordCount map function and serving it via an HTTP server, and writing a Pic function that renders slice data as grayscale pixels.\"}]","A Tour of Go | PDF",101,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/b9506f34d3ebc9c2d4305eb518915891.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/04aacfd860d3727bb0900614fd3d4631.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/bc7f5c48fbf0163b21d2b3790f7a2eb2.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/42c82b743a53ab1a57bdce1aa798e0eb.webp",980,1268,{"list":163,"token":66},[164,171,177,183,189,196,203,210,217,224],{"doc_id":165,"doc_title":166,"file_type":138,"home_preview_img_url":167,"slug":168,"view_count":169,"category_name":30,"create_tm":170},347394,"C Programming Language - 2nd Edition (OCR) - Chapter Outline","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911501529/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=jgzHNQrGvyJvZM656Xs4j2Q07pY%3D","c-programming-language-2nd-edition-ocr-chapter-outline",15,1790066766,{"doc_id":172,"doc_title":173,"file_type":138,"home_preview_img_url":174,"slug":175,"view_count":24,"category_name":30,"create_tm":176},688639,"TEX / LYX Tutorial - About TEX and LYX - Goal of this Mini-tutorial","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001283423/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=1U7bKOGIJ1vdgJVXDDfL3D8qhZ0%3D","tex-lyx-tutorial-about-tex-and-lyx-goal-of-this-mini-tutorial",1794090361,{"doc_id":178,"doc_title":179,"file_type":138,"home_preview_img_url":180,"slug":181,"view_count":24,"category_name":30,"create_tm":182},699588,"Final Cut Pro User’s Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011340753/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=QtRs44fnEV1aOodUxYF8t7xtPQw%3D","final-cut-pro-users-manual",1794480873,{"doc_id":184,"doc_title":185,"file_type":138,"home_preview_img_url":186,"slug":187,"view_count":8,"category_name":30,"create_tm":188},760294,"Embedded Android","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044228737/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=B%2BKTbiDnHWtSqslyybeBveGykTk%3D","embedded-android",1795899395,{"doc_id":190,"doc_title":191,"file_type":138,"home_preview_img_url":192,"slug":193,"view_count":194,"category_name":30,"create_tm":195},652674,"HP Laser 103 series - User Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229973813394/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=LDp%2F87e4qLfpqM9u1nOTuEeIsT4%3D","hp-laser-103-series-user-guide",16,1792881805,{"doc_id":197,"doc_title":198,"file_type":138,"home_preview_img_url":199,"slug":200,"view_count":201,"category_name":30,"create_tm":202},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=gR44RjwCRPv55zTCvfvkFQT7U1s%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",913,1785472614,{"doc_id":204,"doc_title":205,"file_type":138,"home_preview_img_url":206,"slug":207,"view_count":208,"category_name":30,"create_tm":209},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=ocw5Av3lshm8kn1vmPH23ItCrCg%3D","xnx-universal-transmitter-installation-manual",855,1776135954,{"doc_id":211,"doc_title":212,"file_type":138,"home_preview_img_url":213,"slug":214,"view_count":215,"category_name":30,"create_tm":216},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=oONKTv80h7JlOhnUOfngaWT%2BaFI%3D","the-candlestick-trading-bible-trading-guide",804,1789767270,{"doc_id":218,"doc_title":219,"file_type":138,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":30,"create_tm":223},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=WRnnS3gDlJnKsAlADfDgjABAlsE%3D","free-fire-proxy-server",565,1776135932,{"doc_id":225,"doc_title":226,"file_type":138,"home_preview_img_url":227,"slug":228,"view_count":229,"category_name":30,"create_tm":230},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796112179&Signature=VxJECXC8tS46FEEs0CMpUj4tS7E%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",498,1786012506]