Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement commands functionality #3

Closed
yehorbk opened this issue Dec 19, 2021 · 0 comments · Fixed by #6
Closed

Implement commands functionality #3

yehorbk opened this issue Dec 19, 2021 · 0 comments · Fixed by #6
Assignees
Labels
feature New feature or request Edit
Milestone

Comments

@yehorbk
Copy link
Member

yehorbk commented Dec 19, 2021

ACs:

  • Should be implemented in command module

  • Should implement Command interface

  • Implement Print command functionality

  • Implement Split command functionality

  • Print example:

type Print struct {
  arg string
}
func (p *Print) Execute(loop engine.Handler) {
  fmt.Println(p.arg)
}

ATTENTION: THIS COMMAND SHOULD NOT BE IMPLEMENTED IT'S JUST AN EXAMPLE

  • Mul example:
type Mul struct {
  arg1, arg2 int
}
func (mul * Mul) Execute(loop engine.Handler) {
  res := mul.arg1 * mul.arg2
  loop.Post(&printCommand{arg: strconv.Itoa(res)})
}
  • Split flow example:
# input file
split a:bc:d:ef :

# result
a
bc
d
ef
@yehorbk yehorbk added the feature New feature or request Edit label Dec 19, 2021
@yehorbk yehorbk added this to the MS1 milestone Dec 19, 2021
@yehorbk yehorbk self-assigned this Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Edit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant