Letter and symbol before golang import package

Time:2021-8-13

Letter and symbol before golang import package

prefix explain example
cb Alias of the package to be referenced later (conflict prevention) cb "github.com/hyperledger/fabric/protos/common"
_ Only call the init function in the package. Cannot call another function in the package. _ "github.com/hyperledger/fabric/protos/common"
. You can omit the package name when calling a function

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Thank you for your attention

Recommended Today

A thorough understanding of the hystrix go source code

Series articles: Usage and principle of hystrix go A thorough understanding of the hystrix go source code Opening The last article mainly introducedhystrix-goIn this article, let’s comprehensively analyze the source code. This article is very long. Please read it patiently. In addition, because the direct release of the source code affects the mobile phone reading […]