Directories
¶
| Path | Synopsis |
|---|---|
|
ch01
|
|
|
dup1
command
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
command
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
command
|
|
|
echo1
command
Echo1 prints its command-line arguments.
|
Echo1 prints its command-line arguments. |
|
echo2
command
Echo2 prints its command-line arguments.
|
Echo2 prints its command-line arguments. |
|
echo3
command
Echo3 prints its command-line arguments.
|
Echo3 prints its command-line arguments. |
|
echo4
command
Echo4 prints its command-line arguments.
|
Echo4 prints its command-line arguments. |
|
ex1.1
command
Exercise 1.1: Modify the echo program to also print os.Args[0], the name of the command that invoked it.
|
Exercise 1.1: Modify the echo program to also print os.Args[0], the name of the command that invoked it. |
|
ex1.10
command
Exercise 1.10: Find a web site that produces a large amount of data.
|
Exercise 1.10: Find a web site that produces a large amount of data. |
|
ex1.2
command
Exercise 1.2: Modify the echo program to print the index and value of each of its arguments, one per line.
|
Exercise 1.2: Modify the echo program to print the index and value of each of its arguments, one per line. |
|
ex1.3
command
Exercise 1.3: Experiment to measure the difference in running time between our potentially inefficient versions and the one that uses strings.Join.
|
Exercise 1.3: Experiment to measure the difference in running time between our potentially inefficient versions and the one that uses strings.Join. |
|
ex1.4
command
Exercise 1.4: Modify dup2 to print the names of all files in which each duplicated line occurs.
|
Exercise 1.4: Modify dup2 to print the names of all files in which each duplicated line occurs. |
|
ex1.5
command
Exercise 1.5: Change the Lissajous program’s color palette to green on black, for added authenticity.
|
Exercise 1.5: Change the Lissajous program’s color palette to green on black, for added authenticity. |
|
ex1.6
command
Exercise 1.6: Modify the Lissajous program to produce images in multiple colors by adding more values to palette and then displaying them by changing the third argument of SetColorIndex in some interesting way.
|
Exercise 1.6: Modify the Lissajous program to produce images in multiple colors by adding more values to palette and then displaying them by changing the third argument of SetColorIndex in some interesting way. |
|
ex1.7
command
Exercise 1.7: The function call io.Copy(dst, src) reads from src and writes to dst.
|
Exercise 1.7: The function call io.Copy(dst, src) reads from src and writes to dst. |
|
ex1.8
command
Exercise 1.8: Modify fetch to add the prefix http:// to each argument URL if it is missing.
|
Exercise 1.8: Modify fetch to add the prefix http:// to each argument URL if it is missing. |
|
ex1.9
command
Exercise 1.9: Modify fetch to also print the HTTP status code, found in resp.Status.
|
Exercise 1.9: Modify fetch to also print the HTTP status code, found in resp.Status. |
|
fetch
command
Fetch prints the content found at a URL.
|
Fetch prints the content found at a URL. |
|
fetchall
command
Fetchall fetches URLs in parallel and reports their times and sizes.
|
Fetchall fetches URLs in parallel and reports their times and sizes. |
|
helloworld
command
|
|
|
lissajous
command
Lissajous generates GIF animations of random Lissajous figures.
|
Lissajous generates GIF animations of random Lissajous figures. |
Click to show internal directories.
Click to hide internal directories.