- Security with Go
- John Daniel Leon
- 160字
- 2021-06-30 19:06:42
Creating your first package
Within the ~/src directory, any directory you create is a package. The name of your directory becomes the name of the package or application. We need to first make sure that the src directory exists. Tilde (~) is a shortcut for your home directory similar to the $HOME variable. Refer to the following code block:
mkdir ~/src
Let's create a new package named hello for our first application:
cd ~/src
mkdir hello
A package is simply a directory. You can have one or more source files inside a package. Any subdirectories are treated as separate packages. A package can be an application with a main() function (package main), or it can be a library that can only be imported to other packages. This package doesn't have any files yet, but we'll write the first file in a moment. Don't worry too much about package structure for now. You can read more about package paths at https://golang.org/doc/code.html#PackagePaths.
- 普林斯頓微積分讀本(修訂版)
- 矩陣決策:如何鎖定關(guān)鍵點(diǎn)做出制勝策略
- 432級(jí)臺(tái)階之第2級(jí)臺(tái)階
- 張梅玲:讓孩子受益一生的數(shù)學(xué)思維訓(xùn)練
- 走近費(fèi)曼叢書:費(fèi)曼講物理:相對(duì)論
- 數(shù)學(xué)的雨傘下:理解世界的樂趣
- 中國數(shù)學(xué)雙基教學(xué)的史與思
- 數(shù)學(xué)原來可以這樣學(xué):初中篇
- 趣味魔方:一學(xué)就會(huì)的魔方秘笈
- Hands-On IoT Solutions with Blockchain
- 燒腦的邏輯題
- 牛津通識(shí)讀本:數(shù)學(xué)(中文版)
- 歐幾里得之窗
- 12堂魔力數(shù)學(xué)課
- Preventing Ransomware