zookeeper/get_string.go

13 lines
238 B
Go
Raw Normal View History

2021-08-09 03:12:08 +00:00
package zookeeper
import "fmt"
// GetStringValue ...
func GetStringValue(path string) string {
value, _, err := zkClient.Get(path)
if err != nil {
fmt.Printf("Get value from path %s err: %v\n", path, err)
}
return string(value)
}