forked from TrueCloudLab/frostfs-node
[#521] *: use stdlib errors
package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
43e575cec2
commit
71b87155ef
171 changed files with 825 additions and 674 deletions
|
@ -1,8 +1,9 @@
|
|||
package locodedb
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
locodecolumn "github.com/nspcc-dev/neofs-node/pkg/util/locode/column"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// CountryCode represents country code for
|
||||
|
@ -14,7 +15,7 @@ type CountryCode locodecolumn.CountryCode
|
|||
func CountryCodeFromString(s string) (*CountryCode, error) {
|
||||
cc, err := locodecolumn.CountryCodeFromString(s)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not parse country code")
|
||||
return nil, fmt.Errorf("could not parse country code: %w", err)
|
||||
}
|
||||
|
||||
return CountryFromColumn(cc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue