Commit graph

20 commits

Author SHA1 Message Date
Tom Limoncelli 4c3583cd5a
Domains flag should accept simple wildcards (#1983) 2023-01-25 12:17:21 -05:00
Tom Limoncelli b0f2945510
REFACTOR: Add diff2 enable flag to all DNS providers (#1851)
This should enable the diff2 code to be inserted with good "git blame" results for new code.  I'm adding this early to catch any problems early.
2022-12-11 15:02:58 -05:00
Tom Limoncelli ccb582b278
CHORE: Linting (#1704)
* Remove deprecated io/ioutil
* fixup!
* staticcheck and linting
* revert models/provider.go
* Fix imports to new style
* linting
2022-08-14 20:46:56 -04:00
Tom Limoncelli 729672f039
MAINT: Refactor GetDNSConfig (#1466)
* MAINT: Refactor GetDNSConfig

* do not return junk data
2022-03-27 18:00:13 -04:00
Tom Limoncelli ffe21c6e6d
creds.json should not be executable under Windows (#1456)
* Skip CAA flag test for LINODE

* Require go 1.18

* Update CCI to use go 1.18

* go mod tidy

* working

* Update creds.json docs

* go generate
2022-03-25 15:20:30 -04:00
Yuhui Xu 6efedd689d
New feature: FETCH() permits http gets in dnsconfig.js (#1007)
add PANIC() and error-handled FETCH()
2021-01-06 10:45:32 -05:00
Jan-Philipp Benecke 512aa7d4b3
NEW FEATURE: Set JS variables from command line (#913)
* Add ability to specify variables that are passed to js

* Use SplitN to respect a = in value part

* Add JSON parsing for cli variables

* Remove JSON parsing for cli variables

* Add a function to set CLI defaults

* Update static.go
2020-10-27 10:43:00 -04:00
Tom Limoncelli de308c0952
Lint: Fix ST1005: error strings should not be capitalized (#834) 2020-08-30 19:52:37 -04:00
Tom Limoncelli 24b7d0641e Update github.com/StackExchange/dnscontrol/v2 2020-04-14 16:49:03 -04:00
Phil Pennock d221471e38
dnsimple: bug-fix SSHFP, add multi TXT support (#639)
* dnsimple: bug-fix SSHFP, add multi TXT support

The default logic for encoding SSHFP records was dropping the key and
hash algorithms and just posting the content, the `Can` check didn't
stop attempts to use SSHFP.  So, implement SSHFP support.

DNSimple support multiple DNS strings in a TXT record, by representing
the payload as quoted strings already.  This doesn't appear to be
documented, but it does actually work.

* Update docs support matrix too

* fix go fmt missing upstream

Tests failing on my branch for something broken upstream

* fix typo in error message
2020-02-21 13:23:30 -05:00
Tom Limoncelli 891c4162df
Upgrade urfave/cli to v2 (#614)
* Upgrade cli to v2
* Re-vendor
2020-02-03 12:44:11 -05:00
Patrick Gaskin 825ba2d081 Switch to Go 1.13 error wrapping (#604)
* Replaced errors.Wrap with fmt.Errorf (#589)

* Find:    errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)

* Replaced errors.Wrapf with fmt.Errorf (#589)

* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)
* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\)
* Replace: fmt.Errorf($2: %w$3$4, $1)

* Replaced errors.Errorf with fmt.Errorf (#589)

* Find:    errors\.Errorf
  Replace: fmt.Errorf

* Cleaned up remaining imports

* Cleanup

* Regenerate provider support matrix

This was broken by #533 ... and it's now the third time this has been missed.
2020-01-28 11:06:56 -05:00
Patrick Gaskin 2f83aa9302 Internals: Switch to v2 go.mod, drop GOPATH, and fix Azure Pipelines (#595)
* Switched to v2 go.mod

Also set GO111MODULE=on in build stuff to always use Go modules
even when in GOPATH.

* Ensure go.mod, go.sum, and vendor are up to date

* Attempt to fix Azure pipelines

* Add set -e to properly fail on exit (it didn't seem to be
  propagating properly before).
* Set workingDirectory for GoFmt and GoGen (this might be why it
  fails unlike compile and unitests).

* Another attempt to fix Azure Pipelines

* Use the Go env template for all go-related jobs.

* Completely fixed Azure Pipelines

* Added a display name to GoFmt for consistency.
* Fixed diffs for GoFmt and GoGen.
* Show git status for checks.

* Drop GOPATH for tests

TODO: Do the same for integration tests.

* Drop GOPATH for integration tests

* Show more diffs

* Regenerate provider support matrix

This wasn't done in #590...
2020-01-28 10:42:31 -05:00
Tom Limoncelli df163c0042
OVH: Update to use newer client library (#445)
* xlucas/go-ovh is deprecated, use ovh/go-ovh instead.

* vendor github.com/ovh/go-ovh

* Fix 022-sshfp.json test
2019-05-20 15:39:19 -04:00
Ed Bardsley 06ee4d6fb1 Verbose debug logging via the ConsolePrinter and printer package. (#404)
This:
 * adds a global -v flag for verbosity
 * refactors the "printer" package to have a DefaultPrinter and package
   functions that call it, similar to net/http's DefaultServeMux
 * adds printer tests
 * moves current users of Debugf to Printf
 * moves most users of the "log" package to use "printer"
 * demotes noticably noisy log messages to "Debugf", like "IGNORE"-
   and "NO_PURGE"-related messages
2018-10-08 16:10:44 -04:00
Tom Limoncelli 4b1dc82c9b
Switch from fmt.Error* to errors.Error* (#317) 2018-02-05 16:17:20 -05:00
Craig Peterson 7a4dca5ad5 Refactor: Prelink providers to domains (#305) 2018-02-01 11:45:53 -05:00
Tom Limoncelli b7c251190f
Vet and Lint the entire system (#296)
* govet and golint corrections
2018-01-09 12:53:16 -05:00
Craig Peterson 63d496b4c7 make bad flags exit with proper status code 2017-09-15 09:59:43 -04:00
Craig Peterson 1d9d2b1a19 Refactor to use better cli command framework (#177)
* starting to refactor commands

* work

* not sure

* all commands working!

* actually add file

* work in delay flag again

* start to refactor out console printing

* i hate line endings

* simple travis test to find direct output

* remove all direct printing from push/preview

* checkin vendor

* don't need this yet

* forgot to commit these

* make version explicit command

* some code review

* Add "check" subcommand.

* move stuff to commands package

* fix

* comment out check for printlns. for now

* alphabet hax

* activedir flags gone. use creds instead

* active dir doc update

* remove bind specific flags. creds instead

* default to zones dir

* fix linux build

* fix test

* cleanup random global* vars

* Clean up PowerShell docs

* rename dump-ir to print-ir. combine with print-js
2017-09-13 10:00:41 -04:00