Skip to content

Commit ba58a5c

Browse files
authored
Merge pull request #120 from muelli/go-vendor-splits
go: support "=>" lines by splitting the line from the back
2 parents 8ea1acd + fae1511 commit ba58a5c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

go-get/flatpak-go-vendor-generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def parse_modules(fh):
4242
for line in (l.strip() for l in fh if l.strip()):
4343
log.debug("Read line: %s", line)
4444
if line.startswith("# "):
45-
_, name, line_version = line.split(" ")
45+
splits = line.split(" ")
46+
name, line_version = splits[-2], splits[-1]
4647
if '-' in line_version:
4748
log.debug("Parsing version: %s", line_version)
4849
_version, date_revision = line_version.strip().split("-", 1)

0 commit comments

Comments
 (0)