Skip to content

Commit

Permalink
Allow inline resources
Browse files Browse the repository at this point in the history
  • Loading branch information
jgustie committed Aug 11, 2021
1 parent 4162b8d commit 6882f12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/spec/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func (p *Parser) Decode(spec string) (interface{}, error) {
return &kio.ByteReader{Reader: p.Reader}, nil
}

// Inline resources
if strings.ContainsRune(spec, '\n') {
return &kio.ByteReader{Reader: strings.NewReader(spec)}, nil
}

// Absolute file path
if filepath.IsAbs(spec) {
return &konjurev1beta2.File{Path: spec}, nil
Expand Down

0 comments on commit 6882f12

Please sign in to comment.