Skip to content

Commit

Permalink
makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmittag committed Apr 19, 2024
1 parent cbbc225 commit 5247ab3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.PHONY: build
build:
go build

.PHONY: install
install:
go install github.com/simonmittag/puri/cmd/puri

.PHONY: test
test:
go clean -testcache && go test ./...

.PHONY: lint
lint:
golangci-lint run

.PHONY: all
all: lint build test install

25 changes: 14 additions & 11 deletions cmd/puri/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,20 @@ func main() {
} else {
a := flag.Args()
uri, err = parseArgs(a)

if *v {
mode = Version
} else if *p != "" {
mode = Param
} else if *s {
mode = Scheme
} else if *o {
mode = Host
} else if *r {
mode = Port
if err != nil {
mode = Usage
} else {
if *v {
mode = Version
} else if *p != "" {
mode = Param
} else if *s {
mode = Scheme
} else if *o {
mode = Host
} else if *r {
mode = Port
}
}
}

Expand Down

0 comments on commit 5247ab3

Please sign in to comment.