Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hlafaille committed Sep 16, 2024
1 parent ec59317 commit 4c9f908
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
File renamed without changes.
12 changes: 12 additions & 0 deletions internal/context.go
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
package internal

import "os"

// IsDebugMode returns if we should treat the current runtime context and all actions as debug mode.
// Debug mode is effectively wrapping all filesystem actions in the "espresso_debug" directory.
func IsDebugMode() bool {
val, present := os.LookupEnv("ESPRESSO_DEBUG")
if !present {
return false
}
return val == "1"
}
10 changes: 0 additions & 10 deletions internal/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ import (
"strings"
)

// IsDebugMode returns if we should treat the current runtime context and all actions as debug mode.
// Debug mode is effectively wrapping all filesystem actions in the "espresso_debug" directory.
func IsDebugMode() bool {
val, present := os.LookupEnv("ESPRESSO_DEBUG")
if !present {
return false
}
return val == "1"
}

// GetProjectPath gets the source path from the given ProjectConfig
func GetSourcePath(cfg *ProjectConfig) (*string, error) {
wd, err := os.Getwd()
Expand Down
5 changes: 0 additions & 5 deletions internal/source_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ type SourceFile struct {
Content string
}

// readSourceFile reads the file at the given path, or returns an error
func readSourceFile(path string) (*SourceFile, error) {
return nil, nil
}

// IntrospectSourceFiles iterates over the project's base package looking for .java files
// TODO: make this a goroutine?
func DiscoverSourceFiles(cfg *ProjectConfig) ([]SourceFile, error) {
Expand Down

0 comments on commit 4c9f908

Please sign in to comment.