Skip to content

Introduce Format interface and expose to public pkg #195

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

Merged
merged 5 commits into from
Feb 19, 2020

Conversation

khos2ow
Copy link
Member

@khos2ow khos2ow commented Feb 12, 2020

Prerequisites

Put an x into the box(es) that apply:

  • This pull request fixes a bug.
  • This pull request adds a feature.
  • This pull request enhances existing functionality.
  • This pull request introduces breaking change.

For more information, see the Contributing Guide.

Description

A complete overhaul of the internal/pkg packages and move the to either

  1. internal/ for simplicity and not duplicate pkg name
  2. pkg/ to be accessible publicly (as this is a hard requirement for enabling Plugin system)

Publicly available packages are:

  • print: defines an interface to be implemented by a Formatter
  • tfconf: internal representation of a loaded Terraform Module
  • tmpl: templating system which can be used internally or by external plugin developer

Change in the internal package:

  • The only notable change is that because print.Format interface was introduced everything from internal/pkg/print/... was moved under a flat internal/format package. This new format package contains all the different available formats and their corresponding test files and testdata golden files.

Issues Resolved

#149 is blocked by this.

Checklist

Put an x into all boxes that apply:

Tests

  • I have added tests to cover my changes.
  • All tests pass when I run make test.

Documentation

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Code Style

  • My code follows the code style of this project.

@khos2ow khos2ow changed the title Introduce format interface and expose to public pkg Introduce Format interface and expose to public pkg Feb 19, 2020
@khos2ow khos2ow merged commit 38e1897 into terraform-docs:master Feb 19, 2020
@khos2ow khos2ow deleted the printer-interface branch February 19, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant