We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f108cc commit 8bb318dCopy full SHA for 8bb318d
1 file changed
util/util.go
@@ -4,6 +4,7 @@ import (
4
"errors"
5
"fmt"
6
"os"
7
+ "strings"
8
9
"github.com/manifoldco/promptui"
10
"github.com/onflow/flow-go-sdk/client"
@@ -19,10 +20,11 @@ var SilentErr = errors.New("SilentErr")
19
20
func PromptURL() {
21
22
validate := func(input string) error {
- /*_, err := strconv.ParseFloat(input, 64)
23
- if err != nil {
24
- return errors.New("Invalid url")
25
- }*/
+ i := strings.Index(input, ":")
+ if i < 0 {
+ return errors.New("Invalid URL")
26
+ }
27
+
28
return nil
29
}
30
0 commit comments