Skip to content

Commit

Permalink
Clarify the documentation of ParserArgs.Path
Browse files Browse the repository at this point in the history
Signed-off-by: Armel Soro <asoro@redhat.com>
  • Loading branch information
rm3l committed Oct 31, 2023
1 parent 02f8362 commit 32d5250
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/devfile/parser/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ type DevfileCtx struct {
// absolute path of devfile
absPath string

// relative path of devfile
// relative path of devfile.
// It can also be a relative or absolute path to a folder containing one or more devfiles,
// in which case the library will try to pick an existing one, based on the following priority order:
// devfile.yaml > .devfile.yaml > devfile.yml > .devfile.yml
relPath string

// raw content of the devfile
Expand Down
5 changes: 4 additions & 1 deletion pkg/devfile/parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ func parseDevfile(d DevfileObj, resolveCtx *resolutionContextTree, tool resolver
// ParserArgs is the struct to pass into parser functions which contains required info for parsing devfile.
// It accepts devfile path, devfile URL or devfile content in []byte format.
type ParserArgs struct {
// Path is a relative or absolute devfile path on disk
// Path is a relative or absolute devfile path on disk.
// It can also be a relative or absolute path to a folder containing one or more devfiles,
// in which case the library will try to pick an existing one, based on the following priority order:
// devfile.yaml > .devfile.yaml > devfile.yml > .devfile.yml
Path string
// URL is the URL address of the specific devfile.
URL string
Expand Down

0 comments on commit 32d5250

Please sign in to comment.