From b209cb162c547ca7520a0dbe82b12c34673de2e2 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sun, 28 Jul 2019 10:02:38 +0000 Subject: [PATCH] contrib: add words on adding new plugins (#3057) * contrib: add words on adding new plugins New plugins are usually dropped in one giant ball of code, add some words on how this can be approached and made to work faster. (will at least give us something to point at) Signed-off-by: Miek Gieben * Update CONTRIBUTING.md Co-Authored-By: Michael Grosser * Update CONTRIBUTING.md Co-Authored-By: Michael Grosser * Update CONTRIBUTING.md Co-Authored-By: Michael Grosser * Update CONTRIBUTING.md * Update CONTRIBUTING.md Co-Authored-By: Michael Grosser --- CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c2adc709..5cfccf49e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,16 @@ If possible make a pull request as small as possible, or submit multiple pull re feature. Smaller means: easier to understand and review. This in turn means things can be merged faster. +## New Plugins + +A new plugin is (usually) about 1000 lines of Go. This includes tests and some plugin boiler +plate. This is a considerable amount of code and will take time to review. To prevent too much back and +forth it is advisable to start with the plugin's `README.md`; This will be it's main documentation and will help +nail down the correct name of the plugin and its various config options. + +From there it can work its way through the rest (`setup.go`, the `ServeDNS` handler function, +etc.). Doing this will help the reviewers, as each chunk of code is relatively small. + ## Updating Dependencies We use [Go Modules](https://github.com/golang/go/wiki/Modules) as the tool to manage vendor dependencies.