mirror of
https://github.com/thegeeklab/url-parser.git
synced 2024-11-18 03:00:43 +00:00
Robert Kaussow
8457c57394
* fix: fallback to stdin automatically if no url provided by flag * cleanup
16 lines
301 B
Go
16 lines
301 B
Go
package config
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
ErrEmptyURL = errors.New("no url provided either by \"url\" or \"stdin\"")
|
|
ErrReadStdin = errors.New("failed to read \"stdin\"")
|
|
ErrParseURL = errors.New("failed to parse url")
|
|
)
|
|
|
|
type Config struct {
|
|
URL string
|
|
QueryField string
|
|
PathIndex int
|
|
}
|