forked from testcontainers/testcontainers-go
-
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.
chore: generate VSCode file into the .vscode dir
- Loading branch information
1 parent
3f641cf
commit f4acc65
Showing
5 changed files
with
36 additions
and
100 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,13 +1,34 @@ | ||
package vscode | ||
|
||
import "path/filepath" | ||
|
||
type ProjectDirectories struct { | ||
Examples []string | ||
Modules []string | ||
RootDir string | ||
ModuleGeneratorDir string | ||
Examples []string | ||
Modules []string | ||
} | ||
|
||
func newProjectDirectories(examples []string, modules []string) *ProjectDirectories { | ||
func newProjectDirectories(rootDir string, examples []string, modules []string) *ProjectDirectories { | ||
rootDirAbs, err := filepath.Abs(rootDir) | ||
if err != nil { | ||
rootDirAbs = rootDir | ||
} | ||
|
||
moduleGeneratorDirAbs := filepath.Join(rootDirAbs, "modulegen") | ||
|
||
for i, example := range examples { | ||
examples[i] = filepath.Join(rootDirAbs, "examples", example) | ||
} | ||
|
||
for i, module := range modules { | ||
modules[i] = filepath.Join(rootDirAbs, "modules", module) | ||
} | ||
|
||
return &ProjectDirectories{ | ||
Examples: examples, | ||
Modules: modules, | ||
RootDir: rootDirAbs, | ||
ModuleGeneratorDir: moduleGeneratorDirAbs, | ||
Examples: examples, | ||
Modules: modules, | ||
} | ||
} |