Created
March 16, 2021 02:33
-
-
Save iamjjanga-ouo/d46e656e6480b0a3671c273b20546080 to your computer and use it in GitHub Desktop.
Go: get current working directory
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 "os" | |
func main() { | |
dir, err := os.Getwd() | |
if err != nil { | |
log.Fatal(err) | |
} | |
println(dir) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment