This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Animal interface { | |
| Name() string | |
| } | |
| type Doc struct{} | |
| func (doc Dog) Name() string { | |
| return "AuAu" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Listing 7.1 runner/runner.go | |
| // Example is provided with help by Gabriel Aszalos. | |
| // Package runner manages the running and lifetime of a process. | |
| package runner | |
| import ( | |
| "errors" | |
| "os" | |
| "os/signal" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Listing 6.1 listing01.go | |
| // This sample program demonstrates how to create goroutines and | |
| // how the scheduler behaves. | |
| package main | |
| import ( | |
| "fmt" | |
| "runtime" | |
| "sync" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Listing 5.1 Declaration of a struct type | |
| // user defines a user in the program. | |
| type user struct { | |
| name string | |
| email string | |
| ext int | |
| privileged bool | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xinput --list | |
| ⎡ Virtual core pointer id=2 [master pointer (3)] | |
| ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] | |
| ⎜ ↳ Logitech USB Receiver id=13 [slave pointer (2)] | |
| ⎜ ↳ Logitech USB Receiver id=14 [slave pointer (2)] | |
| ⎜ ↳ HAG HHKB modified by HelgeG id=11 [slave pointer (2)] | |
| ⎜ ↳ HAG HHKB modified by HelgeG id=12 [slave pointer (2)] | |
| ⎣ Virtual core keyboard id=3 [master keyboard (2)] | |
| ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] | |
| ↳ Power Button id=6 [slave keyboard (3)] |
NewerOlder