Move most code from the repo root into subdirectories

The intention is to keep to repo root clean while the list of packages
is slowly growing.

Additionally, a bunch of small (~30 LoC) files in the repo root is
merged into a single maddy.go file, for the same reason.

Most of the internal code is moved into the internal/ directory. Go
toolchain will make it impossible to import these packages from external
applications.

Some packages are renamed and moved into the pkg/ directory in the root.
According to https://github.com/golang-standards/project-layout this is
the de-facto standard to place "library code that's ok to use by
external applications" in.

To clearly define the purpose of top-level directories, README.md files
are added to each.
This commit is contained in:
fox.cpp 2019-12-06 01:25:29 +03:00
parent c4df3af4af
commit bf188e454f
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
180 changed files with 722 additions and 684 deletions

3
dist/README.md vendored
View file

@ -1,4 +1,5 @@
# Distribution files for maddy
Distribution files for maddy
------------------------------
**Disclaimer:** Most of the files here are maintained in a "best-effort" way.
That is, they may break or become outdated from time to time. Caveat emptor.