-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.4.0 :: Reenabled ipv6 support, added commit header on load, update…
…d dependencies
- Loading branch information
1 parent
3c455dc
commit 3a31c6f
Showing
4 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"moxxiproxy/cmd" | ||
"runtime/debug" | ||
) | ||
|
||
func main() { | ||
log.Println(CommitInfo()) | ||
cmd.Execute() | ||
} | ||
|
||
func CommitInfo() string { | ||
revision := "" | ||
buildTime := "" | ||
|
||
if info, ok := debug.ReadBuildInfo(); ok { | ||
for _, setting := range info.Settings { | ||
if setting.Key == "vcs.revision" { | ||
revision = setting.Value | ||
} | ||
if setting.Key == "vcs.time" { | ||
buildTime = setting.Value | ||
} | ||
} | ||
} | ||
|
||
return fmt.Sprintf("Rev: %s @ %s", revision, buildTime) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters