private string GetZooKeeperPath()

in client/Apache.ShenYu.Client/Utils/Zookeeper/ZookeeperClient.cs [417:431]


        private string GetZooKeeperPath(string path)
        {
            var basePath = _options.BaseRoutePath ?? "/";

            if (!basePath.StartsWith("/"))
                basePath = basePath.Insert(0, "/");

            basePath = basePath.TrimEnd('/');

            if (!path.StartsWith("/"))
                path = path.Insert(0, "/");

            path = $"{basePath}{path.TrimEnd('/')}";
            return string.IsNullOrEmpty(path) ? "/" : path;
        }