- Learning Functional Programming in Go
- Lex Sheehan
- 144字
- 2021-07-02 23:13:26
The directory structure of the source files
Directories correspond to the book's units and chapters:
![](https://epubservercos.yuewen.com/6176FA/19470400908922906/epubprivate/OEBPS/Images/Chapter_236.jpg?sign=1739053978-cY7EPlwOQxe1CwbUanvIvtXCFdpPjh3H-0-2282ace70a379388278b06b1a320dc43)
You'll find an executable init script file in all project directories. It's there to make your life easier. When you cd into a project directory, first source the init script. You can do that by either typing source init or . init . (The dot (.) and source commands are interchangeable.) The init script will use Glide to install any dependencies for your project in a vendors directory.
For details see the How to build and run Go project section in the Appendix, Miscellaneous Information and How-Tos.
PS: Dependencies are third-party Go libraries that our Go application needs to run properly.
Let's run our first Go application as follows:
![](https://epubservercos.yuewen.com/6176FA/19470400908922906/epubprivate/OEBPS/Images/Chapter_250.jpg?sign=1739053978-ESkdlGzXdCQqIOdcZuo4uYv6drjuBZzE-0-6e3c6a7a69fdac312023db85d05bd4eb)
Each chapter is pided into sequentially numbered directories that are in the order of their appearance in the book.