Commit graph

15 commits

Author SHA1 Message Date
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter () 2022-07-10 11:06:33 -07:00
soulfy
49ee97994e
fix: convert key to domain ()
fix convert key to domain when key ends with '/'
2022-02-01 09:45:43 -05:00
Miek Gieben
9178f9d1ee
Remove newlines between braces ()
These are found with: `pcregrep -M "}\n\n}" **/*.go`
Sometimes a unneeded newline is inserted, remove those.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-11 18:45:01 +01:00
Jonathan Nagy
e3266d24f7 Resolve TXT records via CNAME ()
* Add test case for TXT lookup via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Return HostType of explicit TXT records

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Adapt TXT method lookup to allow lookup via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Implement lookup of TXT records via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>
2020-01-03 14:16:04 +01:00
Miek Gieben
07748d0c34
go report card fixes ()
Went over the list at https://goreportcard.com/report/github.com/coredns/coredns
and removed/fix some code to make it slightly happier.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-24 18:14:25 +00:00
Guangming Wang
7918190901 Cleanup: fix some typos in code comment ()
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-22 14:35:55 +00:00
Christian Muehlhaeuser
c928dbd754 Added comment why ominous assignment is required () 2019-07-19 06:31:29 +00:00
JoeWrightss
f69819387d Fix t.Error error message ()
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-11 07:23:05 +00:00
JoeWrightss
06d945fc32 Fix some spelling errors in comment ()
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-07 11:27:27 -05:00
Miek Gieben
8a5eb58bc0 msg.Service: optimize a bit ()
Make the NewSRV and friends slightly smarter. Optimize the calling of
targetStrip which is almost certainly not used.

Added benchmark show a modest improvement:

benchmark             old ns/op     new ns/op     delta
BenchmarkNewSRV-4     300           283           -5.67%

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-07 12:09:09 -08:00
Miek Gieben
9546b606cb
K8s remove string ops ()
* plugin/kubernetes: remove bunch a string ops

This removes a bunch of appends to where not needed, makes dnsutil.Join
take variadic args which removes the need to wrap in a new string slice.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix calls to dnsutil.Join

Signed-off-by: Miek Gieben <miek@miek.nl>

* Revert these

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 15:12:02 +01:00
Karsten Weiss
6d8a078704 Typo fixes () 2018-08-14 08:55:55 -07:00
Miek Gieben
6e466d5092 Remove dnsutil.Dedup ()
Remove the code and remove the call in etcd and kubernetes handlers.
This does mean we should not add dups in the first place, which means
adding maps in backend_lookup to prevent dups from begin added.

This should cut down on the allocations because dnsutil.Dedup is very
expensive by converting everything to strings, we avoid doing that now.
2018-06-11 19:23:25 -07:00
Miek Gieben
643550eabe presubmit: check for uppercase ()
Another thing we can test automatically, we sorta settled on using an
uppercase letter in in t.Log and t.Fatal calls.

Let's just check for this.
2018-05-07 23:47:25 +02:00
Miek Gieben
d8714e64e4 Remove the word middleware ()
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00