diff --git a/modulegen/internal/workfile/reader.go b/modulegen/internal/workfile/reader.go index 088bf00ef7..e72d0f2367 100644 --- a/modulegen/internal/workfile/reader.go +++ b/modulegen/internal/workfile/reader.go @@ -7,6 +7,7 @@ import ( "golang.org/x/mod/modfile" ) +// Read reads the go.work file from the given path func Read(workFilePath string) (*modfile.WorkFile, error) { file, err := os.ReadFile(workFilePath) if err != nil { diff --git a/modulegen/internal/workfile/writer.go b/modulegen/internal/workfile/writer.go index 634ff72450..b353e24086 100644 --- a/modulegen/internal/workfile/writer.go +++ b/modulegen/internal/workfile/writer.go @@ -8,6 +8,7 @@ import ( "golang.org/x/mod/modfile" ) +// Write writes the given go.work to the given path func Write(workFilePath string, file *modfile.WorkFile) error { err := os.MkdirAll(filepath.Dir(workFilePath), 0o755) if err != nil {