make methods private

This commit is contained in:
Denis Bilenko 2024-12-02 15:43:44 +01:00
parent 0ba23142a2
commit b4251d7b00
1 changed files with 4 additions and 4 deletions

View File

@ -34,13 +34,13 @@ type response struct {
func FetchRepositoryInfo(ctx context.Context, path vfs.Path, w *databricks.WorkspaceClient) (GitRepositoryInfo, error) { func FetchRepositoryInfo(ctx context.Context, path vfs.Path, w *databricks.WorkspaceClient) (GitRepositoryInfo, error) {
if strings.HasPrefix(path.Native(), "/Workspace/") && dbr.RunsOnRuntime(ctx) { if strings.HasPrefix(path.Native(), "/Workspace/") && dbr.RunsOnRuntime(ctx) {
return FetchRepositoryInfoAPI(ctx, path, w) return fetchRepositoryInfoAPI(ctx, path, w)
} else { } else {
return FetchRepositoryInfoDotGit(ctx, path) return fetchRepositoryInfoDotGit(ctx, path)
} }
} }
func FetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.WorkspaceClient) (GitRepositoryInfo, error) { func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.WorkspaceClient) (GitRepositoryInfo, error) {
apiClient, err := client.New(w.Config) apiClient, err := client.New(w.Config)
if err != nil { if err != nil {
return GitRepositoryInfo{}, err return GitRepositoryInfo{}, err
@ -91,7 +91,7 @@ func fixResponsePath(path string) string {
return path return path
} }
func FetchRepositoryInfoDotGit(ctx context.Context, path vfs.Path) (GitRepositoryInfo, error) { func fetchRepositoryInfoDotGit(ctx context.Context, path vfs.Path) (GitRepositoryInfo, error) {
rootDir, err := vfs.FindLeafInTree(path, GitDirectoryName) rootDir, err := vfs.FindLeafInTree(path, GitDirectoryName)
if err != nil { if err != nil {
if !errors.Is(err, fs.ErrNotExist) { if !errors.Is(err, fs.ErrNotExist) {