From afe290fd6f1c332977585be56d81ee9c9758e0c8 Mon Sep 17 00:00:00 2001 From: "jaehoon.hyun" Date: Wed, 27 Mar 2019 14:15:31 +0900 Subject: [PATCH] [TDD] : getdirname and get so file path , get conf file path --- src/configuremgr/incubator/getdirname.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/configuremgr/incubator/getdirname.go diff --git a/src/configuremgr/incubator/getdirname.go b/src/configuremgr/incubator/getdirname.go new file mode 100644 index 0000000..752b439 --- /dev/null +++ b/src/configuremgr/incubator/getdirname.go @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "strings" +) + +func main() { + getdirname() +} + +func getdirname() { + + path := "/tmp/foo/simple" + + dirname := path[strings.LastIndex(path, "/") + 1:] + + soPath := path + "/" + dirname + ".so" + confPath := path + "/" + dirname + ".conf" + + fmt.Println("soPath : " + soPath) + fmt.Println("confPath : " + confPath) + +} \ No newline at end of file -- 2.7.4