Skip to content

Commit

Permalink
Merge pull request #58 from sirredbeard/better_handle_urls
Browse files Browse the repository at this point in the history
Check for http and https prefix
  • Loading branch information
ibuildthecloud authored Feb 22, 2024
2 parents 96938c4 + 43766cb commit 73e994f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ func resolve(ctx context.Context, prg *types.Program, base *source, name, subToo
}

func input(ctx context.Context, base *source, name string) (*source, error) {
if strings.HasPrefix(name, "http://") || strings.HasPrefix(name, "https://") {
base.Remote = true
}

if !base.Remote {
s, ok, err := loadLocal(base, name)
if err != nil || ok {
Expand Down

0 comments on commit 73e994f

Please sign in to comment.