Standard library / go/constant

go/constant.MakeString()

Create a string constant from unquoted Go string content. Expected stdout: '"Go"\n'.

Formal Syntax & Structure

go syntaxgo
func MakeString(s string) Value

Parameters & Attributes

NameTypeDescription
sstringShift distance in bits or string content, depending on the function.

Return Value

Value

Create a string constant from unquoted Go string content.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/constant")
func main() { fmt.Println(constant.MakeString("Go").ExactString()) }
Go Reference