Add en/0.7.x.md syntax highlighting
This commit is contained in:
12
en/07.5.md
12
en/07.5.md
@@ -23,7 +23,7 @@ In Go, most of the file operation functions are located in the `os` package. Her
|
||||
Removes multiple directories according to `path`. Directories will not be deleted if `path` is a single path.
|
||||
|
||||
Code sample:
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -40,7 +40,7 @@ Code sample:
|
||||
}
|
||||
os.RemoveAll("astaxie")
|
||||
}
|
||||
|
||||
```
|
||||
## Files
|
||||
|
||||
### Create and open files
|
||||
@@ -83,7 +83,7 @@ Functions for writing files:
|
||||
Write a string to a file.
|
||||
|
||||
Code sample:
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -104,7 +104,7 @@ Code sample:
|
||||
fout.Write([]byte("Just a test!\r\n"))
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
### Read files
|
||||
|
||||
Functions for reading files:
|
||||
@@ -118,7 +118,7 @@ Functions for reading files:
|
||||
Read data from position `off` to `b`.
|
||||
|
||||
Code sample:
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -143,7 +143,7 @@ Code sample:
|
||||
os.Stdout.Write(buf[:n])
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
### Delete files
|
||||
|
||||
Go uses the same function for removing files and directories:
|
||||
|
||||
Reference in New Issue
Block a user