Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Go Programming - From Beginner to Professional - Second Edition

You're reading from  Go Programming - From Beginner to Professional - Second Edition

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781803243054
Pages 680 pages
Edition 2nd Edition
Languages
Author (1):
Samantha Coyle Samantha Coyle
Profile icon Samantha Coyle

Table of Contents (30) Chapters

Preface 1. Part 1: Scripts
2. Chapter 1: Variables and Operators 3. Chapter 2: Command and Control 4. Chapter 3: Core Types 5. Chapter 4: Complex Types 6. Part 2: Components
7. Chapter 5: Functions – Reduce, Reuse, and Recycle 8. Chapter 6: Don’t Panic! Handle Your Errors 9. Chapter 7: Interfaces 10. Chapter 8: Generic Algorithm Superpowers 11. Part 3: Modules
12. Chapter 9: Using Go Modules to Define a Project 13. Chapter 10: Packages Keep Projects Manageable 14. Chapter 11: Bug-Busting Debugging Skills 15. Chapter 12: About Time 16. Part 4: Applications
17. Chapter 13: Programming from the Command Line 18. Chapter 14: File and Systems 19. Chapter 15: SQL and Databases 20. Part 5: Building For The Web
21. Chapter 16: Web Servers 22. Chapter 17: Using the Go HTTP Client 23. Part 6: Professional
24. Chapter 18: Concurrent Work 25. Chapter 19: Testing 26. Chapter 20: Using Go Tools 27. Chapter 21: Go in the Cloud 28. Index 29. Other Books You May Enjoy

The go doc tool

The go doc tool is used to generate documentation for packages and functions in Go. An often neglected part of many software projects is their documentation. This is because it can be tedious to write and even more tedious to keep up to date. So, Go comes with a tool to automatically generate documentation for package declarations and functions in your code. You simply need to add comments to the start of functions and packages. Then, these will be picked up and combined with the function header.

This can then be shared with others to help them understand how to use your code. To generate the documentation for a package and its function, you can use the go doc tool. Documentation like this helps when you are working on a large project and other people need to make use of your code. Often, in a professional setting, different teams will be working on different parts of a program; each team will need to communicate to the other teams about what functions are available...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}