#8 Correctly determine alternate command paths.
Merged 7 months ago by eclipseo. Opened 7 months ago by qulogic.
GoSIG/ qulogic/go2rpm pkg-main  into  master

file modified
+1 -1

@@ -112,7 +112,7 @@ 

              if file.endswith(".go"):

                  with open(os.path.join(root, file), "r") as f:

                      for line in f:

-                         if line.startswith('func main'):

+                         if line.startswith('package main'):

                              other_cmd.add(os.path.relpath(root, path))

                              break

      return list(other_cmd)

It's not a main function that determines commands, but a main package.

while it's nice the functionality exists in go2rpm, it would be better to add it to golist (and then port it to modist or whatever we'll use for modules) so it can be cabled within go macros and not depend on the spec being regenerated periodically

(short term, making the go2rpm code work better is most excellent of course)

Pull-Request has been merged by eclipseo

7 months ago
Metadata