Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tycooon committed Oct 26, 2021
1 parent 6734c93 commit 8bfe84a
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 8bfe84a

Please sign in to comment.