Last active
July 12, 2020 22:38
-
-
Save kjk/f3200e74ea0cb6cb456b2c973c7bd9ce to your computer and use it in GitHub Desktop.
example for https://notion.so/2db8f87eb5084bfba59f46deb2f51159 (made with https://codeeval.dev)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
) | |
func main() { | |
// :show start | |
st, err := os.Stat("main.go") | |
if err != nil { | |
log.Fatalf("GetFileSize failed with '%s'\n", err) | |
} | |
fmt.Printf(`Name: %s | |
Size: %d | |
IsDir: %v | |
Mode: %x | |
ModTime: %s | |
OS info: %#v | |
`, st.Name(), st.Size(), st.IsDir(), st.Mode, st.ModTime(), st.Sys()) | |
// :show end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment