Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit57d53e9

Browse files
committed
style: improve code readability infs.go file
- Added new lines of code in the `fs.go` file for better readability.- No functionality changes were made in the code.Signed-off-by: Kai-Chu Chung <cage.chung@gmail.com>
1 parentbc7f9b7 commit57d53e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎fs/fs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func (f *DefaultFs) init(dir string) {
5050
f.WriteFile("ak.json",string(dt),true)
5151
}
5252
}
53+
5354
func (f*DefaultFs)ReadFile(pathstring) (string,error) {
5455
d,err:=afero.ReadFile(f.Fs,path)
5556
returnstring(d),err
@@ -77,15 +78,19 @@ func (f *DefaultFs) Mkdir(path string) error {
7778
func (f*DefaultFs)MkdirAll(pathstring)error {
7879
returnf.Fs.MkdirAll(path,os.ModePerm)
7980
}
81+
8082
func (f*DefaultFs)FilePathSeparator()string {
8183
returnafero.FilePathSeparator
8284
}
85+
8386
func (f*DefaultFs)Exists(pathstring) (bool,error) {
8487
returnafero.Exists(f.Fs,path)
8588
}
89+
8690
func (f*DefaultFs)Walk(rootstring,fcfunc(pathstring,info os.FileInfo,errerror)error)error {
8791
returnafero.Walk(f.Fs,root,fc)
8892
}
93+
8994
funcNewDefaultFs(dirstring)*DefaultFs {
9095
dfs:=&DefaultFs{}
9196
dfs.init(dir)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp