Golang os.Getwd() function example
package os
Golang os.Getwd() function usage example
package main
import (
"fmt"
"os"
"strings"
)
func main() {
dir, _ := os.Getwd()
fmt.Println(dir)
}
References :
http://golang.org/pkg/os/#Getwd
https://www.socketloop.com/tutorials/golang-get-current-directory-or-folder
Advertisement
Something interesting
Tutorials
+14k Golang : Reverse IP address for reverse DNS lookup example
+6.4k CodeIgniter : form input set_value cause " to become & quot
+22.7k Golang : Strings to lowercase and uppercase example
+7.4k Golang : Convert source code to assembly language
+20.8k Golang : Convert date string to variants of time.Time type examples
+39.6k Golang : Remove dashes(or any character) from string
+23.5k Golang : Get ASCII code from a key press(cross-platform) example
+8.3k Golang : Count leading or ending zeros(any item of interest) example
+9.1k Golang : Simple histogram example
+7.1k Golang : Validate credit card example
+41k Golang : How to check if a string contains another sub-string?
+10.1k Golang : Compare files modify date example