File: buffer_default.go

package info (click to toggle)
golang-github-segmentio-asm 1.2.0%2Bgit20231107.1cfacc8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 932 kB
  • sloc: asm: 6,093; makefile: 32
file content (21 lines) | stat: -rw-r--r-- 523 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//go:build purego || (!aix && !android && !darwin && !dragonfly && !freebsd && !illumos && !ios && !linux && !netbsd && !openbsd && !plan9 && !solaris)
// +build purego !aix,!android,!darwin,!dragonfly,!freebsd,!illumos,!ios,!linux,!netbsd,!openbsd,!plan9,!solaris

package buffer

type Buffer []byte

func New(n int) (Buffer, error) {
	return make([]byte, n), nil
}

func (a *Buffer) ProtectHead() []byte {
	return []byte(*a)
}

func (a *Buffer) ProtectTail() []byte {
	return []byte(*a)
}

func (a *Buffer) Release() {
}