Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Foreword

Preface

Acknowledgments

About this Book

About the Cover Illustration

Chapter 1. Introducing Go

1.1. Solving modern programming challenges with Go

1.1.1. Development speed

1.1.2. Concurrency

1.1.3. Go’s type system

1.1.4. Memory management

1.2. Hello, Go

1.2.1. Introducing the Go Playground

1.3. Summary

Chapter 2. Go quick-start

2.1. Program architecture

2.2. Main package

2.3. Search package

2.3.1. search.go

2.3.2. feed.go

2.3.3. match.go/default.go

2.4. RSS matcher

2.5. Summary

Chapter 3. Packaging and tooling

3.1. Packages

3.1.1. Package-naming conventions

3.1.2. Package main

3.2. Imports

3.2.1. Remote imports

3.2.2. Named imports

3.3. init

3.4. Using Go tools

3.5. Going farther with Go developer tools

3.5.1. go vet

3.5.2. Go format

3.5.3. Go documentation

3.6. Collaborating with other Go developers

3.6.1. Creating repositories for sharing

3.7. Dependency management

3.7.1. Vendoring dependencies

3.7.2. Introducing gb

3.8. Summary

Chapter 4. Arrays, slices, and maps

4.1. Array internals and fundamentals

4.1.1. Internals

4.1.2. Declaring and initializing

4.1.3. Working with arrays

4.1.4. Multidimensional arrays

4.1.5. Passing arrays between functions

4.2. Slice internals and fundamentals

4.2.1. Internals

4.2.2. Creating and initializing

4.2.3. Working with slices

4.2.4. Multidimensional slices

4.2.5. Passing slices between functions

4.3. Map internals and fundamentals

4.3.1. Internals

4.3.2. Creating and initializing

4.3.3. Working with maps

4.3.4. Passing maps between functions

4.4. Summary

Chapter 5. Go’s type system

5.1. User-defined types

5.2. Methods

5.3. The nature of types

5.3.1. Built-in types

5.3.2. Reference types

5.3.3. Struct types

5.4. Interfaces

5.4.1. Standard library

5.4.2. Implementation

5.4.3. Method sets

5.4.4. Polymorphism

5.5. Type embedding

5.6. Exporting and unexporting identifiers

5.7. Summary

Chapter 6. Concurrency

6.1. Concurrency versus parallelism

6.2. Goroutines

6.3. Race conditions

6.4. Locking shared resources

6.4.1. Atomic functions

6.4.2. Mutexes

6.5. Channels

6.5.1. Unbuffered channels

6.5.2. Buffered channels

6.6. Summary

Chapter 7. Concurrency patterns

7.1. Runner

7.2. Pooling

7.3. Work

7.4. Summary

Chapter 8. Standard library

8.1. Documentation and source code

8.2. Logging

8.2.1. Log package

8.2.2. Customized loggers

8.2.3. Conclusion

8.3. Encoding/Decoding

8.3.1. Decoding JSON

8.3.2. Encoding JSON

8.3.3. Conclusion

8.4. Input and output

8.4.1. Writer and Reader interfaces

8.4.2. Working together

8.4.3. Simple curl

8.4.4. Conclusion

8.5. Summary

Chapter 9. Testing and benchmarking

9.1. Unit testing

9.1.1. Basic unit test

9.1.2. Table tests

9.1.3. Mocking calls

9.1.4. Testing endpoints

9.2. Examples

9.3. Benchmarking

9.4. Summary

Index

List of Figures

List of Listings

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset