gogio: add deeplink support

Add a new flag "-schemes" which links the URL schemes to the app.

Signed-off-by: inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
inkeliz
2025-12-14 12:50:14 +00:00
committed by Elias Naur
parent 74551d3253
commit ae8a780af9
7 changed files with 127 additions and 27 deletions
+11
View File
@@ -31,6 +31,7 @@ type buildInfo struct {
notaryAppleID string
notaryPassword string
notaryTeamID string
schemes []string
}
type Semver struct {
@@ -78,6 +79,7 @@ func newBuildInfo(pkgPath string) (*buildInfo, error) {
notaryAppleID: *notaryID,
notaryPassword: *notaryPass,
notaryTeamID: *notaryTeamID,
schemes: getCommaList(*schemes),
}
return bi, nil
}
@@ -147,6 +149,15 @@ func getLdFlags(appID string) string {
return strings.Join(ldflags, " ")
}
func getCommaList(s string) (list []string) {
for _, v := range strings.Split(s, ",") {
if v := strings.TrimSpace(v); v != "" {
list = append(list, v)
}
}
return list
}
type packageMetadata struct {
PkgPath string
Dir string