debug url reading

This commit is contained in:
Eric Coissac
2025-11-18 15:30:06 +01:00
parent 4603d7973e
commit cef29005a5
3 changed files with 9 additions and 3 deletions
+9 -1
View File
@@ -19,6 +19,13 @@ func ExpandListOfFiles(check_ext bool, filenames ...string) ([]string, error) {
list_of_files := orderedset.NewOrderedSet()
for _, fn := range filenames {
if strings.HasPrefix(fn, "http://") ||
strings.HasPrefix(fn, "https://") ||
strings.HasPrefix(fn, "ftp://") {
list_of_files.Add(fn)
continue
}
err = filepath.Walk(fn,
func(path string, info os.FileInfo, err error) error {
var e error
@@ -147,7 +154,6 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
if err != nil {
return obiiter.NilIBioSequence, err
}
switch CLIInputFormat() {
case "fastq", "fq":
reader = obiformats.ReadFastqFromFile
@@ -178,8 +184,10 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
nreader,
opts...,
)
} else {
if len(list_of_files) > 0 {
iterator, err = reader(list_of_files[0], opts...)
if err != nil {