package main import ( "fmt" "log" "os" ) func main() { if err := run(); err != nil { log.Fatal(err) } } func run() error { info, err := os.Stat("./go.mod") if err != nil { return err } fmt.Println("Name: ", info.Name()) fmt.Println("Size: ", info.Size()) fmt.Println("Mode: ", info.Mode()) fmt.Println("ModTime: ", info.ModTime()) return nil }