September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,32 +0,0 @@
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
)
func main() {
f, err := ioutil.TempFile("", "foo")
if err != nil {
log.Fatal(err)
}
defer f.Close()
// We need to make sure we remove the file
// once it is no longer needed.
defer os.Remove(f.Name())
// … use the file via 'f' …
fmt.Fprintln(f, "Using temporary file:", f.Name())
f.Seek(0, 0)
d, err := ioutil.ReadAll(f)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Wrote and read: %s\n", d)
// The defer statements above will close and remove the
// temporary file here (or on any return of this function).
}

View file

@ -1,6 +0,0 @@
def file = File.createTempFile( "xxx", ".txt" )
// There is no requirement in the instructions to delete the file.
//file.deleteOnExit()
println file