You've already forked woodpecker
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user