Skip to content

Commit

Permalink
Merge pull request #18 from tycooon/fix-typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
dim13 committed Oct 27, 2021
2 parents 6734c93 + 8bfe84a commit a5380af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions migration/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"google.golang.org/protobuf/proto"
)

// ErrUnkown scheme or host
var ErrUnkown = errors.New("unknown")
// ErrUnknown scheme or host
var ErrUnknown = errors.New("unknown")

// Data extracts data part from URL string
func Data(link string) ([]byte, error) {
Expand All @@ -20,10 +20,10 @@ func Data(link string) ([]byte, error) {
return nil, err
}
if u.Scheme != "otpauth-migration" {
return nil, fmt.Errorf("scheme %s: %w", u.Scheme, ErrUnkown)
return nil, fmt.Errorf("scheme %s: %w", u.Scheme, ErrUnknown)
}
if u.Host != "offline" {
return nil, fmt.Errorf("host %s: %w", u.Host, ErrUnkown)
return nil, fmt.Errorf("host %s: %w", u.Host, ErrUnknown)
}
data := u.Query().Get("data")
// fix spaces back to plus sign
Expand Down

0 comments on commit a5380af

Please sign in to comment.