Skip to content

Commit 73e994f

Browse files
Merge pull request #58 from sirredbeard/better_handle_urls
Check for http and https prefix
2 parents 96938c4 + 43766cb commit 73e994f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/loader/loader.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ func resolve(ctx context.Context, prg *types.Program, base *source, name, subToo
388388
}
389389

390390
func input(ctx context.Context, base *source, name string) (*source, error) {
391+
if strings.HasPrefix(name, "http://") || strings.HasPrefix(name, "https://") {
392+
base.Remote = true
393+
}
394+
391395
if !base.Remote {
392396
s, ok, err := loadLocal(base, name)
393397
if err != nil || ok {

0 commit comments

Comments
 (0)