-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ocu-472] basic smithyctl boilerplate #705
Conversation
55da1f9
to
04970de
Compare
smithyctl/pkg/types/v1/parameter.go
Outdated
@@ -57,7 +57,9 @@ func (p *Parameter) UnmarshalJSON(b []byte) error { | |||
case ParameterTypeString, ParameterTypeConststring: | |||
parameterValueStrPtr := &struct{ Value *string }{} | |||
if err = json.Unmarshal(b, parameterValueStrPtr); err == nil { | |||
p.Value = parameterValueStrPtr.Value | |||
if parameterValueStrPtr.Value != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small fix to an issue that I discovered while re-checking all the tests.
@@ -133,7 +134,10 @@ install-go-test-tools: | |||
|
|||
go-tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now covers EVERY possible go test file in the repo. Before there were some issues due to multiple go.mods being present and test runs being hidden on CI.
Now this enable for a sane framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be simplified to find . -name go.mod -execdir go test ./... \;
you shouldn't be looking for _test.go files but for go.mod files
smithyctl/cmd/main.go
Outdated
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) | ||
defer cancel() | ||
|
||
if err := Main(ctx); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two mains can be merged, I don't see the point in a public Main
import "github.com/spf13/cobra" | ||
|
||
// NewCommand returns a new version command. | ||
func NewCommand() *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can implement the version already by injecting a variable with the -X
flag during build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't mind let's do it in its ticket
@@ -133,7 +134,10 @@ install-go-test-tools: | |||
|
|||
go-tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be simplified to find . -name go.mod -execdir go test ./... \;
you shouldn't be looking for _test.go files but for go.mod files
A couple of general comments that don't fit neatly into any of the commits:
|
|
||
// NewCommand returns a new package command. | ||
func NewCommand() *cobra.Command { | ||
// TODO: implement in the next PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a ticket associated with this todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
04970de
to
d14c89b
Compare
d14c89b
to
72f7a78
Compare
Declining in favour of #707 |
smithyctl
commands. Will open another PR shortly implementing packaging.smithyctl/pkg