-
Notifications
You must be signed in to change notification settings - Fork 17
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
add flag: --sqldb #16
base: master
Are you sure you want to change the base?
Conversation
shotizam.go
Outdated
@@ -31,6 +31,7 @@ var ( | |||
base = flag.String("base", "", "base file to diff from; must be in json format") | |||
mode = flag.String("mode", "sql", "output mode; tsv, json, sql, nameinfo") | |||
sqlite = flag.Bool("sqlite", false, "launch SQLite on data (when true, mode flag is ignored)") | |||
sqldb = flag.String("sqldb", "", "save SQLite db (when set, mode and sqlite flag is ignored)") |
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.
as written, this sounds like a boolean flag. specify that this is the target filename to write the DB to?
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.
@bradfitz yep, it's the target db filename.
how about -o filename
, then we can use it like this:
shotizam --sqlite -o bin-size.db /some/go.binary
shotizam --mode csv -o bin-size.csv /some/go.binary
shotizam --mode sql -o bin-size.sql /some/go.binary
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.
Works for me!
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.
working on it..
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's ready.
btw --mode nameinfo
also support -o
shotizam --sqlite -o bin-size.db SELF
shotizam --mode nameinfo -o bin-size.txt SELF
then I can drag the db file to https://observablehq.com/@kindy/shotizam-viz and write sql there
:)