Tag:Custom package

  • Golang import custom package method


    1. Preliminary discussion When I first contacted go, I thought that the import custom package was similar to the Java project, and created a new go project hellogo in the path other than gopath, as follows: Next, a new project Hello API is created using beego’s Bee tool, as follows: Now, if you want to […]

  • Go custom package settings and import operations


    Package import record First, you need to know two values $GOROOT $GOPATH The second value can be set to multiple values, and a colon is used between the two values: to make a connection. When the system looks for a package, it will look for it in the SRC under the corresponding path. For example, […]

  • The method of introducing custom package into golang


    After reading the basic syntax of golang, in order to modularize programming, I tried the package management of golang. As a result, I stepped into several holes. Let’s summarize. I. set $gopath environment variable Different from C or PHP, golang does not automatically find files in the current path. You must first add your own […]