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:
Tai Groot
2021-04-20 06:20:39 -07:00
committed by GitHub
parent 1c454dc629
commit 5ade7a0642
7 changed files with 74 additions and 23 deletions

View File

@@ -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)")