mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
style: run go fmt on every .go file (#392)
This commit is contained in:
parent
8e4dfbd10d
commit
d6ff5f7d96
|
@ -5,10 +5,10 @@
|
||||||
// Package list implements a doubly linked list.
|
// Package list implements a doubly linked list.
|
||||||
//
|
//
|
||||||
// To iterate over a list (where l is a *List):
|
// To iterate over a list (where l is a *List):
|
||||||
|
//
|
||||||
// for e := l.Front(); e != nil; e = e.Next() {
|
// for e := l.Front(); e != nil; e = e.Next() {
|
||||||
// // do something with e.Value
|
// // do something with e.Value
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
package list
|
package list
|
||||||
|
|
||||||
// Element is an element of a linked list.
|
// Element is an element of a linked list.
|
||||||
|
|
|
@ -41,9 +41,9 @@ func loadBpf() (*ebpf.CollectionSpec, error) {
|
||||||
//
|
//
|
||||||
// The following types are suitable as obj argument:
|
// The following types are suitable as obj argument:
|
||||||
//
|
//
|
||||||
// *bpfObjects
|
// *bpfObjects
|
||||||
// *bpfPrograms
|
// *bpfPrograms
|
||||||
// *bpfMaps
|
// *bpfMaps
|
||||||
//
|
//
|
||||||
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
||||||
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
||||||
|
@ -134,5 +134,6 @@ func _BpfClose(closers ...io.Closer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfeb.o
|
//go:embed bpf_bpfeb.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
|
|
@ -41,9 +41,9 @@ func loadBpf() (*ebpf.CollectionSpec, error) {
|
||||||
//
|
//
|
||||||
// The following types are suitable as obj argument:
|
// The following types are suitable as obj argument:
|
||||||
//
|
//
|
||||||
// *bpfObjects
|
// *bpfObjects
|
||||||
// *bpfPrograms
|
// *bpfPrograms
|
||||||
// *bpfMaps
|
// *bpfMaps
|
||||||
//
|
//
|
||||||
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
||||||
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
||||||
|
@ -134,5 +134,6 @@ func _BpfClose(closers ...io.Closer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfel.o
|
//go:embed bpf_bpfel.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
|
|
@ -28,9 +28,9 @@ func loadBpf() (*ebpf.CollectionSpec, error) {
|
||||||
//
|
//
|
||||||
// The following types are suitable as obj argument:
|
// The following types are suitable as obj argument:
|
||||||
//
|
//
|
||||||
// *bpfObjects
|
// *bpfObjects
|
||||||
// *bpfPrograms
|
// *bpfPrograms
|
||||||
// *bpfMaps
|
// *bpfMaps
|
||||||
//
|
//
|
||||||
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
||||||
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
||||||
|
@ -115,5 +115,6 @@ func _BpfClose(closers ...io.Closer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfeb.o
|
//go:embed bpf_bpfeb.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
|
|
@ -28,9 +28,9 @@ func loadBpf() (*ebpf.CollectionSpec, error) {
|
||||||
//
|
//
|
||||||
// The following types are suitable as obj argument:
|
// The following types are suitable as obj argument:
|
||||||
//
|
//
|
||||||
// *bpfObjects
|
// *bpfObjects
|
||||||
// *bpfPrograms
|
// *bpfPrograms
|
||||||
// *bpfMaps
|
// *bpfMaps
|
||||||
//
|
//
|
||||||
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
|
||||||
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
|
||||||
|
@ -115,5 +115,6 @@ func _BpfClose(closers ...io.Closer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not access this directly.
|
// Do not access this directly.
|
||||||
|
//
|
||||||
//go:embed bpf_bpfel.o
|
//go:embed bpf_bpfel.o
|
||||||
var _BpfBytes []byte
|
var _BpfBytes []byte
|
||||||
|
|
|
@ -124,4 +124,4 @@ const (
|
||||||
HTTPVersion2 HTTPVersion = "h2"
|
HTTPVersion2 HTTPVersion = "h2"
|
||||||
// HTTPVersion3 is HTTP/3.
|
// HTTPVersion3 is HTTP/3.
|
||||||
HTTPVersion3 HTTPVersion = "h3"
|
HTTPVersion3 HTTPVersion = "h3"
|
||||||
)
|
)
|
||||||
|
|
|
@ -109,7 +109,7 @@ func (doh *dnsOverHTTPS) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.
|
||||||
// formats that include the ID field from the DNS message header, such
|
// formats that include the ID field from the DNS message header, such
|
||||||
// as "application/dns-message", SHOULD use a DNS ID of 0 in every DNS
|
// as "application/dns-message", SHOULD use a DNS ID of 0 in every DNS
|
||||||
// request.
|
// request.
|
||||||
m=m.Copy()
|
m = m.Copy()
|
||||||
id := m.Id
|
id := m.Id
|
||||||
m.Id = 0
|
m.Id = 0
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user