update inbox list
This commit is contained in:
12
vendor/scrivo/highlight.php/test/detect/go/default.txt
vendored
Normal file
12
vendor/scrivo/highlight.php/test/detect/go/default.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
ch := make(chan float64)
|
||||
ch <- 1.0e10 // magic number
|
||||
x, ok := <- ch
|
||||
defer fmt.Println(`exitting now\`)
|
||||
go println(len("hello world!"))
|
||||
return
|
||||
}
|
||||
15
vendor/scrivo/highlight.php/test/detect/go/swift-like.txt
vendored
Normal file
15
vendor/scrivo/highlight.php/test/detect/go/swift-like.txt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
func makeRequest(method string, url string, cb func(error, io.ReadCloser)) {
|
||||
req, _ := http.NewRequest(method, url, nil)
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
cb(err, nil)
|
||||
} else {
|
||||
cb(err, resp.Body)
|
||||
}
|
||||
}
|
||||
func main() {
|
||||
makeRequest("GET", "http://ipinfo.io/json", func(err error, body io.ReadCloser) {
|
||||
defer body.Close()
|
||||
io.Copy(os.Stdout, body)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user