package
0.0.0-20220422115226-3c77e8d6ee9b
Repository: https://github.com/capitanflint129/architectural-patterns-in-go.git
Documentation: pkg.go.dev

# README

Shell

Simple shell based on the command pattern

https://refactoring.guru/ru/design-patterns/command

Commands

  • cd [dir]
  • pwd
  • echo [string]
  • kill [pid]
  • ps
  • fork [command [argument ...]]
  • exec [command [argument ...]]

Pipes

It is possible to combine commands into a pipeline using pipe. Commands are executed concurrently, each in its own goroutine, data transfer between commands is carried out using channels. For example:

cd / | pwd

Class diagram

Sequence diagram