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