2023-01-16 10:50:31 +08:00
|
|
|
package buf
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/sagernet/sing/common"
|
|
|
|
"github.com/sagernet/sing/common/buf"
|
|
|
|
)
|
|
|
|
|
2023-02-25 13:12:19 +08:00
|
|
|
const BufferSize = buf.BufferSize
|
|
|
|
|
2023-01-16 10:50:31 +08:00
|
|
|
type Buffer = buf.Buffer
|
|
|
|
|
2023-04-12 14:40:38 +08:00
|
|
|
var (
|
|
|
|
New = buf.New
|
|
|
|
StackNew = buf.StackNew
|
|
|
|
StackNewSize = buf.StackNewSize
|
|
|
|
With = buf.With
|
|
|
|
)
|
2023-02-25 13:12:19 +08:00
|
|
|
|
2023-01-16 10:50:31 +08:00
|
|
|
var KeepAlive = common.KeepAlive
|
|
|
|
|
|
|
|
//go:norace
|
|
|
|
func Dup[T any](obj T) T {
|
|
|
|
return common.Dup(obj)
|
|
|
|
}
|
|
|
|
|
2023-04-12 14:40:38 +08:00
|
|
|
var (
|
|
|
|
Must = common.Must
|
|
|
|
Error = common.Error
|
|
|
|
)
|