style: format golang import package code style (#58)

Co-authored-by: Kevin Yu <yqlbu@Bu.edu>
This commit is contained in:
czybjtu
2023-04-23 13:27:29 +08:00
committed by GitHub
parent 064bf1ebbc
commit e71c272693
80 changed files with 276 additions and 200 deletions

View File

@ -8,8 +8,6 @@ package assets
import (
"errors"
"fmt"
"github.com/adrg/xdg"
"github.com/sirupsen/logrus"
"io/fs"
"os"
"path/filepath"
@ -17,6 +15,9 @@ import (
"strings"
"sync"
"time"
"github.com/adrg/xdg"
"github.com/sirupsen/logrus"
)
const CacheTimeout = 5 * time.Second

View File

@ -7,9 +7,10 @@ package bitlist
import (
"fmt"
"github.com/mzz2017/softwind/common"
"github.com/daeuniverse/dae/pkg/anybuffer"
"math/bits"
"github.com/daeuniverse/dae/pkg/anybuffer"
"github.com/mzz2017/softwind/common"
)
// CompactBitList allows your units to be of arbitrary bit size.

View File

@ -6,8 +6,9 @@
package consts
import (
"golang.org/x/sys/unix"
"net/netip"
"golang.org/x/sys/unix"
)
type DialerSelectionPolicy string

View File

@ -6,9 +6,10 @@
package consts
import (
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
"strconv"
"strings"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
)
const (

View File

@ -6,11 +6,12 @@
package common
import (
"github.com/sirupsen/logrus"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/sirupsen/logrus"
)
func ReportMemory(tag string) {

View File

@ -6,8 +6,9 @@
package json
import (
jsoniter "github.com/json-iterator/go"
"unsafe"
jsoniter "github.com/json-iterator/go"
)
type FuzzyBoolDecoder struct {
@ -48,4 +49,4 @@ func (decoder *FuzzyBoolDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Itera
default:
iter.ReportError("FuzzyBoolDecoder", "not number, string or bool")
}
}
}

View File

@ -9,17 +9,18 @@ import (
"context"
"encoding/binary"
"fmt"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/pool"
"github.com/sirupsen/logrus"
"golang.org/x/net/dns/dnsmessage"
"io"
"math"
"net/netip"
"strings"
"sync"
"time"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/pool"
"github.com/sirupsen/logrus"
"golang.org/x/net/dns/dnsmessage"
)
var (

View File

@ -9,11 +9,12 @@ import (
"context"
"errors"
"fmt"
"net/netip"
"sync"
"github.com/mzz2017/softwind/netproxy"
"github.com/sirupsen/logrus"
"golang.org/x/net/dns/dnsmessage"
"net/netip"
"sync"
)
type Ip46 struct {

View File

@ -10,8 +10,6 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/sirupsen/logrus"
"github.com/daeuniverse/dae/common"
"io"
"net"
"net/http"
@ -20,6 +18,9 @@ import (
"path/filepath"
"strconv"
"strings"
"github.com/daeuniverse/dae/common"
"github.com/sirupsen/logrus"
)
type sip008 struct {

View File

@ -12,10 +12,6 @@ import (
"encoding/binary"
"encoding/hex"
"fmt"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
"github.com/vishvananda/netlink"
"golang.org/x/net/dns/dnsmessage"
"golang.org/x/sys/unix"
"net/netip"
"net/url"
"path/filepath"
@ -24,6 +20,11 @@ import (
"strings"
"time"
"unsafe"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
"github.com/vishvananda/netlink"
"golang.org/x/net/dns/dnsmessage"
"golang.org/x/sys/unix"
)
var (