1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-06-30 22:13:45 +02:00

Cleanup Code (#348)

* Fix "Empty slice declaration using a literal"
* Fix "collides with imported package name"
* Remove unused code in pipeline
* Remove unused oauth2.providerAuthHeaderWorks()
* Add TODOs
* Format Code
* Cleanup doublestar import
* Migrate deprecated functions

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543
2021-09-24 16:29:26 +02:00
committed by GitHub
parent e8db6b8c04
commit 0bd10fa507
38 changed files with 144 additions and 187 deletions

View File

@ -48,7 +48,7 @@ type Opts struct {
// New returns a Remote implementation that integrates with a Coding Platform or
// Coding Enterprise version control hosting provider.
func New(opts Opts) (remote.Remote, error) {
remote := &Coding{
r := &Coding{
URL: defaultURL,
Client: opts.Client,
Secret: opts.Secret,
@ -59,10 +59,10 @@ func New(opts Opts) (remote.Remote, error) {
SkipVerify: opts.SkipVerify,
}
if opts.URL != defaultURL {
remote.URL = strings.TrimSuffix(opts.URL, "/")
r.URL = strings.TrimSuffix(opts.URL, "/")
}
return remote, nil
return r, nil
}
type Coding struct {