Skip to content

Commit 23e46ac

Browse files
committed
Fixed Minor issues After Sanity
1 parent 7a94cd8 commit 23e46ac

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

cmd/delete/domain/domain.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ func NewdomainCmd() *cobra.Command {
4141
return err
4242
}
4343
urls := strings.Split(p.Callbackurl, ";")
44-
if !strings.Contains(p.Callbackurl, opts.Domain) {
44+
_, found := cmdutil.Find(urls, opts.Domain)
45+
if !found {
4546
return &cmdutil.FlagError{Err: errors.New("Entered Domain not found")}
4647
}
4748
if len(urls) == 1 {

cmd/get/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func configure() error {
3333
if err != nil {
3434
return err
3535
}
36+
fmt.Println("App Name:", resp.Appname)
3637
fmt.Println("API Key:", resp.Key)
3738
fmt.Println("API Secret:", resp.Secret)
3839
return nil

cmdutil/lrUtils.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,12 @@ func UAString() string {
108108
}
109109
return ""
110110
}
111+
112+
func Find(slice []string, val string) (int, bool) {
113+
for i, item := range slice {
114+
if item == val {
115+
return i, true
116+
}
117+
}
118+
return -1, false
119+
}

0 commit comments

Comments
 (0)