Wednesday, 12 March 2025

GO LANG get working dir

// This is important for docker container , cause ur path might be different

 f, _ := os.Getwd()  

fmt.Println(filepath.Base(f))

fmt.Println(filepath.Dir(f))

No comments:

Post a Comment