Fix import ordering (#58)

This commit is contained in:
Gerhard Tan
2023-05-18 17:26:28 +08:00
committed by GitHub
parent fd224d7a70
commit b7154f1656
30 changed files with 91 additions and 90 deletions

View File

@ -8,13 +8,13 @@ import (
"strings"
"syscall"
"golang.org/x/sys/windows"
"golang.org/x/sys/windows/svc"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/version"
"github.com/koho/frpmgr/services"
"github.com/koho/frpmgr/ui"
"golang.org/x/sys/windows"
"golang.org/x/sys/windows/svc"
)
func fatal(v ...interface{}) {

View File

@ -5,12 +5,12 @@ import (
"fmt"
"strings"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
frputil "github.com/fatedier/frp/pkg/util/util"
"github.com/thoas/go-funk"
"gopkg.in/ini.v1"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
)
type ClientAuth struct {

View File

@ -4,10 +4,10 @@ import (
"os"
"time"
"gopkg.in/ini.v1"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"gopkg.in/ini.v1"
)
func init() {

View File

@ -1,13 +1,13 @@
package consts
import (
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/validators"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
"golang.org/x/sys/windows"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/validators"
)
// Links

View File

@ -1,8 +1,9 @@
package layout
import (
"github.com/lxn/walk"
"testing"
"github.com/lxn/walk"
)
func TestNewGreedyLayoutItem(t *testing.T) {

View File

@ -1,9 +1,9 @@
package validators
import (
"github.com/koho/frpmgr/i18n"
"github.com/lxn/walk"
"github.com/koho/frpmgr/i18n"
)
type GTEValidator struct {

View File

@ -1,9 +1,9 @@
package validators
import (
"github.com/koho/frpmgr/i18n"
"github.com/lxn/walk"
"github.com/koho/frpmgr/i18n"
)
type PasswordValidator struct {

View File

@ -3,9 +3,9 @@ package validators
import (
"errors"
"github.com/koho/frpmgr/i18n"
"github.com/lxn/walk"
"github.com/koho/frpmgr/i18n"
)
var (

View File

@ -3,11 +3,11 @@ package services
import (
"os"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
frpconfig "github.com/fatedier/frp/pkg/config"
"github.com/fatedier/frp/pkg/util/log"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
)
func deleteFrpConfig(serviceName string, configPath string, c config.Config) {

View File

@ -6,11 +6,11 @@ import (
"path/filepath"
"time"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
"github.com/fatedier/frp/pkg/util/log"
"golang.org/x/sys/windows/svc"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
)
func ServiceNameOfClient(name string) string {

View File

@ -6,12 +6,12 @@ import (
"io"
"net/http"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/version"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type AboutPage struct {

View File

@ -1,11 +1,11 @@
package ui
import (
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
)
// NewBrowseLineEdit places a tool button at the tail of a LineEdit, and opens a file dialog when the button is clicked

View File

@ -5,13 +5,13 @@ import (
"path/filepath"
"sync"
"github.com/lxn/walk"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
"github.com/thoas/go-funk"
)
// The flag controls the running state of service.

View File

@ -3,13 +3,13 @@ package ui
import (
"time"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type ConfPage struct {

View File

@ -9,15 +9,15 @@ import (
"path/filepath"
"strings"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/layout"
"github.com/koho/frpmgr/pkg/util"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
)
type ConfView struct {

View File

@ -7,15 +7,15 @@ import (
"strings"
"time"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
)
type EditClientDialog struct {

View File

@ -3,15 +3,15 @@ package ui
import (
"strings"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
)
type EditProxyDialog struct {

View File

@ -1,9 +1,9 @@
package ui
import (
"github.com/koho/frpmgr/pkg/consts"
"github.com/lxn/walk"
"github.com/koho/frpmgr/pkg/consts"
)
var cachedSystemIconsForWidthAndDllIdx = make(map[widthDllIdx]*walk.Icon)

View File

@ -5,12 +5,12 @@ import (
"sync"
"time"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/util"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/util"
)
type LogPage struct {

View File

@ -4,11 +4,11 @@ import (
"os"
"strings"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
"github.com/lxn/walk"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/util"
)
type ConfListModel struct {

View File

@ -4,13 +4,13 @@ import (
"os"
"path/filepath"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
var stateDescription = map[consts.ServiceState]string{

View File

@ -3,13 +3,13 @@ package ui
import (
"fmt"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/validators"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type PluginProxyDialog struct {

View File

@ -3,13 +3,13 @@ package ui
import (
"fmt"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/validators"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type portProxyBinder struct {

View File

@ -4,14 +4,14 @@ import (
"os"
"sort"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/sec"
"github.com/koho/frpmgr/pkg/validators"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
)
type PrefPage struct {

View File

@ -6,13 +6,13 @@ import (
"path/filepath"
"strings"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type ProxyView struct {

View File

@ -1,9 +1,9 @@
package ui
import (
"github.com/koho/frpmgr/pkg/config"
"github.com/lxn/walk"
"github.com/koho/frpmgr/pkg/config"
)
// quickAddBinder is the view model of quick-add dialog

View File

@ -3,14 +3,14 @@ package ui
import (
"fmt"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/config"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/pkg/validators"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
type SimpleProxyDialog struct {

View File

@ -5,16 +5,16 @@ import (
"path/filepath"
"strings"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/lxn/win"
"github.com/thoas/go-funk"
"golang.org/x/sys/windows"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/koho/frpmgr/services"
)
const AppName = "FRP Manager"

View File

@ -8,13 +8,13 @@ import (
"strings"
"sync"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"github.com/thoas/go-funk"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/util"
)
type URLImportDialog struct {

View File

@ -5,13 +5,13 @@ import (
"syscall"
"unsafe"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/sec"
"github.com/lxn/walk"
"github.com/lxn/win"
"golang.org/x/sys/windows"
"github.com/koho/frpmgr/i18n"
"github.com/koho/frpmgr/pkg/consts"
"github.com/koho/frpmgr/pkg/sec"
)
// ValidateDialog validates the administration password.