Underscores in Imports

Underscores in Imports Underscores in Go serve a few purposes. In U+005F, “” is a letter (as a string). You may also see them as [ “” ] in between successive digits and a base prefix. In this case, it’s to improve the readability of the code. You may also see them in function names, e.g., imaginary_lit. The underscore is quite a versatile tool. They even have their place in defining the kind of action that will take place in a function. https://golangcode.com/underscores-in-imports/

Creato 2y | 6 dic 2021, 00:20:12


Accedi per aggiungere un commento

Altri post in questo gruppo

Struct Tags with Underscore Before Function Names

In the Go world, an underscore (_) before an expression is called a blank identifier. As you may already know, identifiers—user-defined program components, e.g., name of a function, variable, or packa

4 nov 2021, 00:20:15 | GolangCode
Hello world! How to Start any Go Application

http

Hello world! How to Start any Go Application

https://golangcode.com/hello-world/

17 giu 2020, 21:42:11 | GolangCode