-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: replace js render to template #57
Conversation
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.
some needed JS was removed, so the search doesn't work now
go.mod
Outdated
@@ -3,6 +3,18 @@ module github.com/afdesk/scan2html | |||
go 1.19 |
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.
let's bump the version up
go.mod
Outdated
@@ -3,6 +3,18 @@ module github.com/afdesk/scan2html | |||
go 1.19 | |||
|
|||
require ( | |||
github.com/afdesk/trivy-go-plugin v0.0.0-20230425141703-7d18a52213b0 | |||
github.com/aquasecurity/trivy v0.38.3 |
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.
let's try to use the latest version
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.
I left a few small comments
PTAL
thanks
main.go
Outdated
} | ||
|
||
firstHTML, err := common.ReadPluginFile("first.html") | ||
rootCmd, err := initFlags() |
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.
it seems initFlags
isn't relevant, something like initRootCmd
looks better, isn't it?
main.go
Outdated
if err != nil { | ||
log.Fatalf("failed to read html file: %v", err) | ||
log.Fatalf("%+v", err) |
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.
fatal log without description doesn't look great
main.go
Outdated
if err != nil { | ||
log.Fatalf("failed to read html file: %v", err) | ||
if err = rootCmd.Execute(); err != nil { | ||
log.Fatalf("%+v", err) |
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.
ditto
main.go
Outdated
if err != nil { | ||
log.Fatalf("Failed to display help message %v", err) | ||
return err |
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.
maybe we should add some comment for this error too? It will be hard to look for a reason of unknown errors
var ( | ||
tempJsonFileName = "scan2html-report-temp.json" | ||
version = "dev" | ||
availableFlags = []string{"--html-result", "--load-result"} |
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 need to update README.MD
(new flags, etc.)
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.
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.
* init v3 * feat: replace js render to template (#57) * feat: replace js render to template * feat: add extra tables to template * ci: update release steps * test: add unit tests * ci: change test trigger branch * ci: change test trigger branch * fix: change path for testing * ci: add checkout * fix: add changes according PR reviews * test: update testdata * fix: add centering for fixed version * docs: update README.md * chore: add cmd short description * feat: add k8s scan report (#59) --------- Co-authored-by: olsova <olga.solopova@smartforce.io>
No description provided.