forked from joejulian/gio-cmd
gogio: set gioui.org/app.ID in addition to the log package's appID
app.ID is documented to be set by the gogio tool, but never was. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -97,6 +97,9 @@ func getLdFlags(appID string) string {
|
|||||||
ldflags = append(ldflags, strings.Split(extra, " ")...)
|
ldflags = append(ldflags, strings.Split(extra, " ")...)
|
||||||
}
|
}
|
||||||
// Pass appID along, to be used for logging on platforms like Android.
|
// Pass appID along, to be used for logging on platforms like Android.
|
||||||
|
ldflags = append(ldflags, fmt.Sprintf("-X gioui.org/app.ID=%s", appID))
|
||||||
|
// Support earlier Gio versions that had a separate app id recorded.
|
||||||
|
// TODO: delete this in the future.
|
||||||
ldflags = append(ldflags, fmt.Sprintf("-X gioui.org/app/internal/log.appID=%s", appID))
|
ldflags = append(ldflags, fmt.Sprintf("-X gioui.org/app/internal/log.appID=%s", appID))
|
||||||
// Pass along all remaining arguments to the app.
|
// Pass along all remaining arguments to the app.
|
||||||
if appArgs := flag.Args()[1:]; len(appArgs) > 0 {
|
if appArgs := flag.Args()[1:]; len(appArgs) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user