I am trying to parse go metafiles in the format of following:
require (
github.com/cheggaaa/pb v1.0.28
github.com/coreos/go-semver v0.2.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/dustin/go-humanize v1.0.0
github.com/fatih/color v1.7.0
...
)
how do I get data between brackets and without using a regexp? (otherwise this noobish question would not exist at all). I have tried playing with split()
but failed so far.