more progress
This commit is contained in:
29
exp/file/file.go
Normal file
29
exp/file/file.go
Normal file
@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("vim-go")
|
||||
f, err := os.Create("./lsdkj/lfksdjf")
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
err = f.Close()
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
log.Println("created")
|
||||
/*
|
||||
data, err := os.ReadFile("./foo/notexist")
|
||||
if err == nil {
|
||||
fmt.Println(data)
|
||||
} else if errors.Is(err, os.ErrNotExist) {
|
||||
fmt.Printf("not exist: %v\n", err)
|
||||
}
|
||||
fmt.Printf("err: %v\n", err)
|
||||
*/
|
||||
}
|
17
exp/log/main.go
Normal file
17
exp/log/main.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.balki.me/tss/log"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("vim-go")
|
||||
log.Info("does this work", "trycount", 1)
|
||||
// fmt.Sprint("ldskfjdsice")
|
||||
s := zap.S()
|
||||
s.Warnw("How does this look", "trycount", 2)
|
||||
s.Sync()
|
||||
}
|
Reference in New Issue
Block a user