What\'s C++\'s using some_namespace::object
equivalent in golang?
According to the question here
I can get using namespace common
with sta
The following code comes close in terms of readability, but is less efficient, since the compiler cannot inline function calls anymore.
import (
"fmt"
"strings"
)
var (
Sprintf = fmt.Sprintf
HasPrefix = strings.HasPrefix
)
And, it has the side-effect of importing the names fmt
and strings
into the file scope, which is something that C++'s using
does not do.