Skip to content

Commit

Permalink
Add more comments to improve a document in pkg.go.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sujamess committed Oct 15, 2021
1 parent de8ac78 commit 8b0ec1a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions currency/coincurency.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package currency

// CoinCurrency represents a currency for selecting a decimal currency
// when the flag WithCurrency in options.ConvertOptions is true.
type CoinCurrency string

// CoinCurrencies is a map between currency and coin currency
var CoinCurrencies = map[Currency]CoinCurrency{
USD: "cents",
THB: "satangs",
Expand Down
5 changes: 5 additions & 0 deletions currency/currency.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package currency

// Currency represents a currency for selecting an integer currency
// when the flag WithCurrency in options.ConvertOptions is true
type Currency string

const (
// USD represents a U.S. Dollar currency
USD Currency = "USD"
// THB represents a Thai Baht currency
THB Currency = "THB"
)

// Point uses when the flag WithCurrency in options.ConvertOptions is false
const Point = "point"

// String gets a string value
Expand Down
3 changes: 2 additions & 1 deletion lang/lang.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package lang

// Lang represents
// Lang represents a language for selecting a word language
type Lang string

const (
// AmericanEnglish is an `en-us`
AmericanEnglish Lang = "en-us"
)
1 change: 1 addition & 0 deletions numconword.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
)

var (
// ErrInvalidNumber is an error when input an invalid number
ErrInvalidNumber = errors.New("numconword: invalid number")
)

Expand Down

0 comments on commit 8b0ec1a

Please sign in to comment.