forked from joejulian/gio-cmd
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user