-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: catalog handling + build service client + state dir
- Loading branch information
Showing
10 changed files
with
277 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,4 @@ | |
|
||
package k6exec | ||
|
||
const ( | ||
k6binary = "k6" | ||
k6temp = "k6-*" | ||
) | ||
const k6binary = "k6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,4 @@ | |
|
||
package k6exec | ||
|
||
const ( | ||
k6binary = "k6.exe" | ||
k6temp = "k6-*.exe" | ||
) | ||
const k6binary = "k6.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package k6exec | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
) | ||
|
||
// CleanupState deletes the state directory belonging to the current process. | ||
func CleanupState(opts *Options) error { | ||
dir, err := opts.stateSubdir() | ||
if err != nil { | ||
return fmt.Errorf("%w: %s", ErrState, err.Error()) | ||
} | ||
|
||
if err = os.RemoveAll(dir); err != nil { //nolint:forbidigo | ||
return fmt.Errorf("%w: %s", ErrState, err.Error()) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.