asyncapi / parser-go

It parses AsyncAPI documents.
Apache License 2.0
55 stars 17 forks source link

Move main code to cmd #29

Closed fmvilas closed 5 years ago

fmvilas commented 5 years ago

What?

I'm moving the code in main.go to cmd/tester/main.go and putting the cparser package back to main.

Why?

For two reasons:

  1. I want to compile to C in multiple platforms. For that purpose, we need to have exactly one main package, otherwise, it will not compile.
  2. This package is meant to just contain a library. If we want to create a CLI tool, we should create another package that uses this one as a dependency. Why is that? Because we're going to use this library as a dependency in many places so the smaller it is the better.
fmvilas commented 5 years ago

I'm moving forward and gonna merge this PR. Please, if you see something wrong, missing, or just don't agree with the changes, don't hesitate to leave a comment after it's merged. I'll be happy to address these questions afterward.

xino12 commented 5 years ago

awesome