I found a nil pointer panic when a post failed to be claimed. Since it's sorta difficult to make these errors happen, I just went ahead and fixed it.
I like that you included logs with the status of each post. I just tweaked it so successes only show up when running with the -v (verbose) flag. Errors will still always show up on os.Stderr. But if all goes well when someone runs writeas claim, there will be no output -- which is the same as writeas delete and other subcommands.
Thanks @robjloranger, this is great.
I found a nil pointer panic when a post failed to be claimed. Since it's sorta difficult to make these errors happen, I just went ahead and fixed it.
I like that you included logs with the status of each post. I just tweaked it so successes only show up when running with the
-v
(verbose) flag. Errors will still always show up onos.Stderr
. But if all goes well when someone runswriteas claim
, there will be no output -- which is the same aswriteas delete
and other subcommands.