mirror of
https://github.com/mudabbir-ahmad/LearningGo.git
synced 2026-10-07 17:50:20 +00:00
trynna fix nil
This commit is contained in:
1 parent
d5818cf669
commit
b2512bd39a
1 file changed
+1
-9
@@ -7,17 +7,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
func check(e error) {
|
|
||||||
e != nil
|
|
||||||
{
|
|
||||||
panic(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func write(a, b string) {
|
func write(a, b string) {
|
||||||
path := filepath.Join(a, b)
|
path := filepath.Join(a, b)
|
||||||
file, err := os.Create(path)
|
file, _ := os.Create(path)
|
||||||
check(err)
|
|
||||||
|
|
||||||
file.Sync()
|
file.Sync()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user