github.com/zuoyebang/bitalostable@v1.0.1-0.20240229032404-e3b99a834294/internal/manual/manual_nocgo.go (about) 1 // Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use 2 // of this source code is governed by a BSD-style license that can be found in 3 // the LICENSE file. 4 5 //go:build !cgo 6 // +build !cgo 7 8 package manual 9 10 // Provides versions of New and Free when cgo is not available (e.g. cross 11 // compilation). 12 13 // New allocates a slice of size n. 14 func New(n int) []byte { 15 return make([]byte, n) 16 } 17 18 // Free frees the specified slice. 19 func Free(b []byte) { 20 }