Go ba test
  • یادگیری گو با تست
  • اصول گو
    • نصب گو
    • سلام، دنیا
    • اعداد صحیح
    • تکرار
    • آرایه و اسلایس
    • ساختار, متد و اینترفیس
    • پوینتر و خطا
    • مپ
    • تزریق وابستگی
    • تقلید
    • همزمانی
    • دستور Select
    • انعکاس
    • کتابخانه‌ی Sync
    • کتابخانه‌ی Context
    • Intro to property based tests
    • Maths
    • Reading files
    • Templating
    • Generics
    • Revisiting arrays and slices with generics
  • Testing fundamentals
    • Introduction to acceptance tests
    • Scaling acceptance tests
    • Working without mocks
  • Build an application
    • Intro
    • HTTP server
    • JSON, routing and embedding
    • IO and sorting
    • Command line & package structure
    • Time
    • WebSockets
  • Questions and answers
    • OS Exec
    • Error types
    • Context-aware Reader
    • Revisiting HTTP Handlers
  • Meta
    • Why unit tests and how to make them work for you
    • Anti-patterns
    • Contributing
    • Chapter Template
Powered by GitBook
On this page
  1. Build an application

Intro

PreviousWorking without mocksNextHTTP server

Last updated 1 year ago

Now that you have hopefully digested the Go Fundamentals section you have a solid grounding of a majority of Go's language features and how to do TDD.

This next section will involve building an application.

Each chapter will iterate on the previous one, expanding the application's functionality as our product owner dictates.

New concepts will be introduced to help facilitate writing great code but most of the new material will be learning what can be accomplished from Go's standard library.

By the end of this, you should have a strong grasp as to how to iteratively write an application in Go, backed by tests.

  • - We will create an application which listens to HTTP requests and responds to them.

  • - We will make our endpoints return JSON and explore how to do routing.

  • - We will persist and read our data from disk and we'll cover sorting data.

  • - Support multiple applications from one code base and read input from command line.

  • - using the time package to schedule activities.

  • - learn how to write and test a server that uses WebSockets.

HTTP server
JSON, routing and embedding
IO and sorting
Command line & project structure
Time
WebSockets