From a118d6156190d935279f77250a4eb7c134faf3bc Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Jul 11 2019 04:26:53 +0000 Subject: Correctly determine alternate command paths. It's not a `main` function that determines commands, but a `main` package. --- diff --git a/go2rpm/__main__.py b/go2rpm/__main__.py index b42f0d3..66b4577 100644 --- a/go2rpm/__main__.py +++ b/go2rpm/__main__.py @@ -112,7 +112,7 @@ def has_other_cmd(goipath): 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)