-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from g4s8/i13-embedded-struct
fix: use field doc for embedded struct field type
- Loading branch information
Showing
9 changed files
with
96 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package main | ||
|
||
import "time" | ||
|
||
//go:generate go run ../ -output embedded.md | ||
type Config struct { | ||
// Start date. | ||
Start Date `env:"START,notEmpty"` | ||
} | ||
|
||
// Date is a time.Time wrapper that uses the time.DateOnly layout. | ||
type Date struct { | ||
time.Time | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Environment Variables | ||
|
||
## Config | ||
|
||
- `START` (**required**, non-empty) - Start date. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package main | ||
|
||
import "time" | ||
|
||
//go:generate go run ../ -output typedef.md | ||
type Config struct { | ||
// Start date. | ||
Start Date `env:"START"` | ||
} | ||
|
||
// Date is a time.Time wrapper that uses the time.DateOnly layout. | ||
type Date time.Time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
## Config | ||
|
||
- `SOME_TIME` - Some time. | ||
- `START` - Start date. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package testdata | ||
|
||
import "time" | ||
|
||
type Config struct { | ||
// Start date. | ||
Start Date `env:"START,notEmpty"` | ||
} | ||
|
||
// Date is a time.Time wrapper that uses the time.DateOnly layout. | ||
type Date struct { | ||
time.Time | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package testdata | ||
|
||
import "time" | ||
|
||
type Config struct { | ||
// Start date. | ||
Start Date `env:"START"` | ||
} | ||
|
||
// Date is a time.Time wrapper that uses the time.DateOnly layout. | ||
type Date time.Time |