playground-go

module
v0.0.0-...-d4efea6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2019 License: MIT

README

playground-go

Tutorial
  • 1.1 Hello, World
  • 1.2 Command-Line Arguments
  • 1.3 Finding Duplicate Lines
  • 1.4 Animated GIFs
  • 1.5 Fetching a URL
  • 1.6 Fetching URLs Concurrently
  • 1.7 A Web Server
  • 1.8 Loose Ends
Program Structure
  • 2.1 Names
  • 2.2 Declarations
  • 2.3 Variables
  • 2.3.1 Short Variable Declarations
  • 2.3.2 Pointers
  • 2.3.3 The new Function
  • 2.3.4 Lifetime of Variables
  • 2.4 Assignments
  • 2.4.1 Tuple Assignment
  • 2.4.2 Assignability
  • 2.5 Type Declarations
  • 2.6 Packages and Files
  • 2.6.1 Imports
  • 2.6.2 Package Initialization
  • 2.7 Scope
Basic Data Types
  • 3.1 Integers
  • 3.2 Floating-Point Numbers
  • 3.3 Complex Numbers
  • 3.4 Booleans
  • 3.5 Strings
  • 3.6 Constants
Composite Types
  • 4.1 Arrays
  • 4.2 Slices
  • 4.3 Maps
  • 4.4 Structs
  • 4.5 JSON
  • 4.6 Text and HTML Templates
Functions
  • 5.1 Function Declarations
  • 5.2 Recursion
  • 5.3 Multiple Return Values
  • 5.4 Errors
  • 5.5 Function Values
  • 5.6 Anonymous Functions
  • 5.7 Variadic Functions
  • 5.8 Deferred Function Calls
  • 5.9 Panic
  • 5.10 Recover
  • 6.1 Method Declarations
  • 6.2 Methods with a Pointer Receiver
  • 6.3 Composing Types by Struct Embedding
  • 6.4 Method Values and Expressions
  • 6.5 Example: Bit Vector Type
  • 6.6 Encapsulation
  • 7 Interfaces
  • 7.1 Interfaces as Contracts

Directories

Path Synopsis
chapter1
dup1
Dup1 prints the text of each line that appears more than once in the standard input, preceded by its count.
Dup1 prints the text of each line that appears more than once in the standard input, preceded by its count.
dup2
Dup2 prints the count and text of lines that appear more than once in the input.
Dup2 prints the count and text of lines that appear more than once in the input.
dup3
Dup3 prints the count and text of lines that appear more than once in the named input files.
Dup3 prints the count and text of lines that appear more than once in the named input files.
echo1
Echo1 prints its command-line arguments.
Echo1 prints its command-line arguments.
echo2
Echo2 prints its command-line arguments.
Echo2 prints its command-line arguments.
echo3
Echo3 prints its command-line arguments.
Echo3 prints its command-line arguments.
fetch
Fetch prints the content found at each specified URL.
Fetch prints the content found at each specified URL.
fetchall
Fetchall fetches URLs in parallel and reports their times and sizes.
Fetchall fetches URLs in parallel and reports their times and sizes.
helloworld
Helloworld is our first Go program.
Helloworld is our first Go program.
chapter2
cf
chapter3
chapter4
issuereport
Issuesreport prints a report of issues matching the search terms.
Issuesreport prints a report of issues matching the search terms.
movie
Movie prints Movies as JSON.
Movie prints Movies as JSON.
rev
chapter5
defer1
Defer1 demonstrates a deferred call being invoked during a panic.
Defer1 demonstrates a deferred call being invoked during a panic.
defer2
Defer2 demonstrates a deferred call to runtime.Stack during a panic.
Defer2 demonstrates a deferred call to runtime.Stack during a panic.
findlinks1
Findlinks1 prints the links in an HTML document read from standard input.
Findlinks1 prints the links in an HTML document read from standard input.
findlinks2
findlinks url ...
findlinks url ...
links
Package links provides a link-extraction function.
Package links provides a link-extraction function.
outline
Outline prints the outline of an HTML document tree.
Outline prints the outline of an HTML document tree.
outline2
Outline print the outline of a html document tree
Outline print the outline of a html document tree
squares
The squares program demonstrates a function value with state.
The squares program demonstrates a function value with state.
title1
Title1 prints the title of an HTML document specified by a URL.
Title1 prints the title of an HTML document specified by a URL.
title2
Title2 prints the title of an HTML document specified by a URL.
Title2 prints the title of an HTML document specified by a URL.
title3
Title3 prints the title of an HTML document specified by a URL.
Title3 prints the title of an HTML document specified by a URL.
toposort
The toposort program prints the nodes of a DAG in topological order.
The toposort program prints the nodes of a DAG in topological order.
trace
The trace program uses defer to add entry/exit diagnostics to a function.
The trace program uses defer to add entry/exit diagnostics to a function.
wait
The wait program waits for an HTTP server to start responding.
The wait program waits for an HTTP server to start responding.
chapter6
coloredpoint
Coloredpoint demonstrates struct embedding.
Coloredpoint demonstrates struct embedding.
geometry
Package geometry defines simple types for plane geometry.
Package geometry defines simple types for plane geometry.
intset
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
urlvalues
The urlvalues command demonstrates a map type with methods.
The urlvalues command demonstrates a map type with methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL