Golang packages: Difference between revisions

From wikinotes
Line 2: Line 2:
<blockquote>
<blockquote>
<syntaxhighlight lang="go">
<syntaxhighlight lang="go">
import "fmt"
import (
import (
     "fmt"                                // builtin pkgs have no module-path prefix
     "fmt"                                // builtin pkgs have no module-path prefix

Revision as of 19:31, 23 May 2022

Imports

import "fmt"

import (
    "fmt"                                // builtin pkgs have no module-path prefix
    "golang.org/x/example/stringutil"    // third-party pkgs have module-path prefix
)