-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from yby654/develop
api: rest: workflow api add
- Loading branch information
Showing
9 changed files
with
1,944 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ dependency: ## Get dependencies | |
lint: dependency ## Lint the files | ||
@echo "Running linter..." | ||
@if [ ! -f "${GOPATH}/bin/golangci-lint" ] && [ ! -f "$(GOROOT)/bin/golangci-lint" ]; then \ | ||
${GO_COMMAND} install github.com/golangci/golangci-lint/cmd/[email protected].2; \ | ||
${GO_COMMAND} install github.com/golangci/golangci-lint/cmd/[email protected].3; \ | ||
fi | ||
@golangci-lint run --timeout 30m -E contextcheck -D unused | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package common | ||
|
||
import ( | ||
"fmt" | ||
"net/url" | ||
) | ||
|
||
func UrlDecode(text string) (string) { | ||
decodedStr, err := url.QueryUnescape(text) | ||
if err != nil { | ||
fmt.Println("Error decoding URL:", err) | ||
return err.Error() | ||
} else { | ||
return decodedStr | ||
} | ||
} | ||
|
||
func UrlEncode(text string) (string) { | ||
encodedStr := url.QueryEscape(text) | ||
|
||
return encodedStr | ||
} |
Oops, something went wrong.