github.com/AndrienkoAleksandr/go@v0.0.19/src/intern/abi/unsafestring_go120.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build go1.20
     6  // +build go1.20
     7  
     8  package abi
     9  
    10  import "unsafe"
    11  
    12  func unsafeStringFor(b *byte, l int) string {
    13  	return unsafe.String(b, l)
    14  }
    15  
    16  func unsafeSliceFor(b *byte, l int) []byte {
    17  	return unsafe.Slice(b, l)
    18  }