Where is the source code implementation of string (line) in golang

question: this line of code

str := string(line)

line is of type [] byte. I want to see the implementation of the string function. Where can I see it?

Click the string function to jump to

// string is the set of all strings of 8-bit bytes, conventionally but not
// necessarily representing UTF-8-encoded text. A string may be empty, but
// not nil. Values of string type are immutable.
type string string

string function not found

Mar.20,2021

The concrete implementation of the

string () function is related to the type of parameter that calls it, as well as to the go version.

< hr >

for example, the following code

package main

import "fmt"

func main() {
    b := make([]byte, 10)
    fmt.Println(string(b))
}

you can run go build-gcflags-S xxx.go to view assembly information

...
CALL    runtime.slicebytetostring(SB)
...
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36a95-2c02a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36a95-2c02a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?