Fix pb utility (#16)
* Update dependencies and go compile target version * Adds deletion support to the server * Add form around delete button * Add support for returning the url in curl * remove -config option for now * Upload as form value instead of file * remove dependencies from go mod * update to README re: new curl usage
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/prologic/pastebin/client"
|
||||
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/namsral/flag"
|
||||
)
|
||||
|
||||
@@ -16,22 +15,12 @@ const (
|
||||
defaultURL = "http://localhost:8000"
|
||||
)
|
||||
|
||||
func getDefaultConfig() string {
|
||||
path, err := homedir.Expand(defaultUserConfig)
|
||||
if err != nil {
|
||||
return defaultConfig
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
func main() {
|
||||
var (
|
||||
config string
|
||||
url string
|
||||
insecure bool
|
||||
)
|
||||
|
||||
flag.StringVar(&config, "config", getDefaultConfig(), "path to config")
|
||||
flag.StringVar(&url, "url", defaultURL, "pastebin service url")
|
||||
flag.BoolVar(&insecure, "insecure", false, "insecure (skip ssl verify)")
|
||||
|
||||
|
Reference in New Issue
Block a user