mirror of
https://github.com/SourceFellows/gobuch.git
synced 2026-07-03 19:37:06 +02:00
initial import
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
bites, err := ioutil.ReadFile("test.txt")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Printf("%s\n", bites)
|
||||
fmt.Println(string(bites))
|
||||
|
||||
toWrite := []byte("Hello World!")
|
||||
err = ioutil.WriteFile("test2.txt", toWrite, 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Hello World!
|
||||
Reference in New Issue
Block a user