group imports

This commit is contained in:
Eoin McAfee 2021-06-01 10:29:58 +01:00
parent 3b4d528ee9
commit 31867a9261
18 changed files with 43 additions and 26 deletions

View file

@ -16,6 +16,7 @@ package core
import (
"context"
"github.com/drone/drone/handler/api/errors"
)

View file

@ -7,9 +7,10 @@
package template
import (
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"net/http"
)
// HandleListAll returns an http.HandlerFunc that writes a json-encoded

View file

@ -9,15 +9,16 @@ package template
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/errors"
"github.com/drone/drone/mock"
"github.com/go-chi/chi"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"net/http"
"net/http/httptest"
"testing"
)
var (

View file

@ -8,9 +8,10 @@ package template
import (
"encoding/json"
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"net/http"
)
type templateInput struct {

View file

@ -7,10 +7,11 @@
package template
import (
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"github.com/go-chi/chi"
"net/http"
)
// HandleDelete returns an http.HandlerFunc that processes http

View file

@ -9,14 +9,15 @@ package template
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/drone/drone/handler/api/errors"
"github.com/drone/drone/mock"
"github.com/go-chi/chi"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"net/http"
"net/http/httptest"
"testing"
)
func TestHandleDelete(t *testing.T) {

View file

@ -7,10 +7,11 @@
package template
import (
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"github.com/go-chi/chi"
"net/http"
)
// HandleFind returns an http.HandlerFunc that writes json-encoded

View file

@ -9,14 +9,15 @@ package template
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/drone/drone/handler/api/errors"
"github.com/drone/drone/mock"
"github.com/go-chi/chi"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"net/http"
"net/http/httptest"
"testing"
)
func TestHandleFind(t *testing.T) {

View file

@ -7,10 +7,11 @@
package template
import (
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"github.com/go-chi/chi"
"net/http"
)
// HandleList returns an http.HandlerFunc that writes a json-encoded

View file

@ -7,14 +7,15 @@ package template
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/drone/drone/handler/api/errors"
"github.com/drone/drone/mock"
"github.com/go-chi/chi"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"net/http"
"net/http/httptest"
"testing"
)
func TestHandleList(t *testing.T) {

View file

@ -6,10 +6,11 @@ package template
import (
"encoding/json"
"net/http"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/render"
"github.com/go-chi/chi"
"net/http"
)
type templateUpdate struct {

View file

@ -10,15 +10,16 @@ import (
"bytes"
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/errors"
"github.com/drone/drone/mock"
"github.com/go-chi/chi"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"net/http"
"net/http/httptest"
"testing"
)
func TestHandleUpdate(t *testing.T) {

View file

@ -16,9 +16,10 @@ package converter
import (
"context"
"strings"
"github.com/drone/drone/core"
"github.com/drone/drone/plugin/converter/starlark"
"strings"
)
// New returns a conversion service that converts the

View file

@ -16,6 +16,7 @@ package starlark
import (
"bytes"
"github.com/drone/drone/core"
"github.com/drone/drone/handler/api/errors"
"github.com/sirupsen/logrus"

View file

@ -15,11 +15,12 @@
package converter
import (
"io/ioutil"
"testing"
"github.com/drone/drone/core"
"github.com/drone/drone/mock"
"github.com/golang/mock/gomock"
"io/ioutil"
"testing"
)
func TestTemplatePluginConvert(t *testing.T) {

View file

@ -84,7 +84,7 @@ func (p *parser) Parse(req *http.Request, secretFunc func(string) string) (*core
os.Stderr.Write(out)
}
// callback function provides the webhook parsers with
// callback function provides the webhook parser with
// a per-repository secret key used to verify the webhook
// payload signature for authenticity.
fn := func(webhook scm.Webhook) (string, error) {

View file

@ -8,6 +8,7 @@ package template
import (
"context"
"github.com/drone/drone/core"
"github.com/drone/drone/store/shared/db"
)

View file

@ -9,9 +9,10 @@ package template
import (
"context"
"database/sql"
"testing"
"github.com/drone/drone/core"
"github.com/drone/drone/store/shared/db/dbtest"
"testing"
)
var noContext = context.TODO()