Commit graph

62 commits

Author SHA1 Message Date
Lin-1997
d4e351c3fd
fix: plugin/auto: call OnShutdown() for each zone at its own OnShutdown() (#6705)
Signed-off-by: Lin-1997 <1204878199@qq.com>
2024-10-01 12:07:37 -04:00
Chris O'Haver
5617d9e015
plugin/auto: warn when auto is unable to read elements of the directory tree (#6333)
* warn when auto is unable to read elements of the directory tree

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

---------

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-12-04 12:51:50 -05:00
Eng Zer Jun
b868350fc2
test: use t.TempDir to create temporary test directory (#6164) 2023-06-17 15:21:01 +02:00
Ayato Tokubi
83e94a91b9
Bump golang to 1.20.0 (#6070)
Signed-off-by: Ayato Tokubi <atokubi@redhat.com>
2023-05-04 10:47:18 +02:00
Chris O'Haver
77c7c0b4cb
send notifies after adding zones all zones (#5774)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-02-15 13:25:02 -05:00
Yong Tang
006703c1b2
plugin/auto: fix ticker leak in golang (#5688) 2022-10-11 15:27:20 +02:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Yong Tang
c6709d930f
Fix security scans by cleaning up file path (#5185)
While performing security scans there were several
issue raised as G304 (CWE-22): Potential file inclusion via variable.
As some files path are taken from user input, it is possible the
filepath passed by user may have unintended effect if not properly formed.
This fix add Clean to remove the security warning and address some
potential issue.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-14 11:24:21 -05:00
gomakesix
71bb575b71
plugin/auto: Fix panic caused by config invalid reload value (#4986)
Automatically submitted.
2021-11-19 16:19:25 +00:00
Zou Nengren
5191959bd7
cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-13 09:30:31 +02:00
Chris O'Haver
158ad2d738
plugin/file/auto: Write CNAME answer to client even if target lookup is SERVFAIL (#4863)
* write cname answer to client even if target lookup is servfail

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix existing unit test expectations

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-09-14 10:08:22 +02:00
Sven Nebel
47be274d34
Fix plugin file reload comment (#4665)
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2021-06-05 15:06:25 +02:00
Miek Gieben
5f41d8eb1f
reverse zone: fix Normalize (#4621)
Make normalize return multiple "hosts" (= reverse zones) when a
non-octet boundary cidr is given.

Added pkg/cidr package that holds the cidr calculation routines; felt
they didn't really fit dnsutil.

This change means the IPNet return parameter isn't needed, the hosts are
all correct. The tests that tests this is also removed: TestSplitHostPortReverse
The fallout was that zoneAddr _also_ doesn't need the IPNet member, that
in turn make it visible that zoneAddr in address.go duplicated a bunch
of stuff from register.go; removed/refactored that too.

Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the
right things, by consuming ZONE arguments; this now expands reverse
zones correctly. This is mostly mechanical.

Remove the reverse test in plugin/kubernetes which is a copy-paste from
a core test (which has since been fixed).

Remove MustNormalize as it has no plugin users.

This change is not backwards compatible to plugins that have a ZONE
argument that they parse in the setup util.

All in-tree plugins have been updated.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17 13:19:54 -07:00
Miek Gieben
74ef6e00f1
transfer: reply with refused (#4510)
* transfer: reply with refused

When the *transfer* plugin is not loaded and of the handlers will still
see the AXFR/IXFR request because it is not intercepted.

They need to reply with REFUSED in that case. Update file, auto and k8s
to do this. Add testcase in the file plugin.

Ideally *erratic* should be moved over as well, but maybe that's
*erratic*

This is a bug fix.

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

* import path

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-09 12:17:34 -08:00
Miek Gieben
9178f9d1ee
Remove newlines between braces (#4279)
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
Macks
a0f7120864
plugins/auto: allow fallthrough if no zone match (#4166)
* plugins/auto: allow fallthrough if no zone match

this is a solution to #3033

Signed-off-by: Macks <macksme@outlook.com>

* plugin/auto.go remove whitespace

Signed-off-by: Macks <macksme@outlook.com>
2020-10-01 15:25:19 +02:00
Yong Tang
9798dd067f
Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142)
* Implement notifies for transfer plugin (#3972)

* Fix notifies in transfer plugin

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

* Make it compile

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

* Port more plugins

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

* golint

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

* Fix tests

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

* Fix notifies in transfer plugin

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

* Make it compile

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

* Port more plugins

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

* golint

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

* Fix tests

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

* Fix tests

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

* really fix test

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

* Implement ixfr fallback and unify file and auto for transfering

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

* Add transfer tests

copied and modified from #3452

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

* Test correct selection of plugin

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

* add upstream back in

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

* Implement ixfr fallback and unify file and auto for transfering

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

* fix test

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

* properly merge

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

* Remove plugin/kubernetes/setup_transfer_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

Co-authored-by: Miek Gieben <miek@miek.nl>
2020-09-24 20:30:39 +02:00
Miek Gieben
b003d06003
For caddy v1 in our org (#4018)
* For caddy v1 in our org

This RP changes all imports for caddyserver/caddy to coredns/caddy. This
is the v1 code of caddy.

For the coredns/caddy repo the following changes have been made:

* anything not needed by us is deleted
* all `telemetry` stuff is deleted
* all its import paths are also changed to point to coredns/caddy
* the v1 branch has been moved to the master branch
* a v1.1.0 tag has been added to signal the latest release

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

* Fix imports

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

* Group coredns/caddy with out plugins

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

* remove this file

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

* Relax import ordering

github.com/coredns is now also a coredns dep, this makes
github.com/coredns/caddy fit more natural in the list.

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

* Fix final import

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-24 18:14:41 +02:00
Grant Garrett-Grossman
6c747d7097
Update README.md (#4068)
* Update README.md

Specify that serial must change for the zone file to be reloaded.

Signed-off-by: Grant Garrett-Grossman <grantlg2@illinois.edu>

* Update plugin/auto/README.md

Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Grant Garrett-Grossman <grantlg2@illinois.edu>

Co-authored-by: Miek Gieben <miek@miek.nl>
2020-08-19 20:33:40 -07:00
Yong Tang
614d08cba2
Revert "Implement notifies for transfer plugin (#3972)" (#3995)
This reverts commit 68f1dd5ddf.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-07-08 09:00:26 -07:00
Miek Gieben
68f1dd5ddf
Implement notifies for transfer plugin (#3972)
* Fix notifies in transfer plugin

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

* Make it compile

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

* Port more plugins

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

* golint

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

* Fix tests

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

* Fix notifies in transfer plugin

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

* Make it compile

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

* Port more plugins

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

* golint

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

* Fix tests

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

* Fix tests

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

* really fix test

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

* Implement ixfr fallback and unify file and auto for transfering

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

* Add transfer tests

copied and modified from #3452

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

* Test correct selection of plugin

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

* add upstream back in

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

* Implement ixfr fallback and unify file and auto for transfering

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

* fix test

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

* properly merge

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-07-07 12:38:07 -07:00
Miek Gieben
24176a97e6
Move to CODEOWNERS (#3489)
* Move to CODEOWNERS

No change in who own what; just a move to CODEOWNERS. This allows
dreck cleanups.

Added .dreck.yaml for alias and exec.

Fixes: #3486

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

* stickler bot

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

* sort the file

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-11-29 13:17:05 +00:00
Miek Gieben
dbd1c047cb
Run gostaticheck (#3325)
* Run gostaticheck

Run gostaticcheck on the codebase and fix almost all flagged items.

Only keep

* coremain/run.go:192:2: var appVersion is unused (U1000)
* plugin/chaos/setup.go:54:3: the surrounding loop is unconditionally terminated (SA4004)
* plugin/etcd/setup.go:103:3: the surrounding loop is unconditionally terminated (SA4004)
* plugin/pkg/replacer/replacer.go:274:13: argument should be pointer-like to avoid allocations (SA6002)
* plugin/route53/setup.go:124:28: session.New is deprecated: Use NewSession functions to create sessions instead. NewSession has the same functionality as New except an error can be returned when the func is called instead of waiting to receive an error until a request is made.  (SA1019)
* test/grpc_test.go:25:69: grpc.WithTimeout is deprecated: use DialContext and context.WithTimeout instead.  Will be supported throughout 1.x.  (SA1019)

The first one isn't true, as this is set via ldflags. The rest is
minor. The deprecation should be fixed at some point; I'll file some
issues.

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

* Make sure to plug in the plugins

import the plugins, that file that did this was removed, put it in the
reload test as this requires an almost complete coredns server.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-10-01 07:41:29 +01:00
Miek Gieben
004c5fca9d
all: simply registering plugins (#3287)
Abstract the caddy call and make it simpler.

See #3261 for some part of the discussion.

Go from:

~~~ go
func init() {
       caddy.RegisterPlugin("any", caddy.Plugin{
               ServerType: "dns",
               Action:     setup,
       })
}
~~~

To:

~~~ go
func init() { plugin.Register("any", setup) }
~~~

This requires some external documents in coredns.io to be updated as
well; the old way still works, so it's backwards compatible.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-20 08:02:30 +01:00
Miek Gieben
62317c3c14 update doc to not use the root zone for everything (#3288)
Update all documentation in the tree to use example.org as an example
configuration (in so far possible). As to get out of the just use "."
and fallthrough and things would be fine.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-19 06:17:53 -07:00
Miek Gieben
94930d20ea
plugin/file: rework outgoing axfr (#3227)
* plugin/file: rework outgoing axfr

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

* Fix test

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

* Actually properly test xfr

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

* Fix test

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-30 13:47:27 +01:00
Chris O'Haver
3f47fc8ba4
typo fixes (#3169)
* spelling fixes

* its/it's
2019-08-21 16:08:55 -04:00
Yong Tang
f8bba51f84
Update Caddy to 1.0.1, and update import path (#2961)
* Update Caddy to 1.0.1, and update import path

This fix updates caddy to 1.0.1 and also
updates the import path to github.com/caddyserver/caddy

This fix fixes 2959

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Also update plugin.cfg

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update and bump zplugin.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-07-03 09:04:47 +08:00
Miek Gieben
22c6e3e179
plugins: set upstream unconditionally (#2956)
`upstream` is not needed as a setting; just set if unconditionally and
remove all documentation and tests for it.

At some point we want remove the hanlding for `upstream` as well and
error out on seeing it.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-02 16:23:47 +01:00
An Xiao
c1d7c2e69b Raise error if regexp and template are not specified together (#2884)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-06-13 12:07:41 +01:00
Xiao An
cb96ab9f4f Fully deprecate TIMEOUT and NO_RELOAD (#2742)
* Fully deprecate NO_RELOAD

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Fully deprecate TIMEOUT

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Update CI tests to adapt to the deprecation of TIMEOUT

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Add documents for directive transfer in plugin auto

Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-04-01 07:28:01 +01:00
Miek Gieben
53f3f0b666
Remove context.Context from request.Request (#2726)
* Remove context.Context from request.Request

This removes the context from request.Request and makes all the changes
in the code to make it compile again. It's all mechanical. It did
unearth some weirdness in that the context was kept in handler structs
which may cause havoc with concurrently handling of requests.

Fixes #2721

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

* Make test compile

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-26 14:37:30 +00:00
Xiao An
89a4b9bd45 Add deprecation notice for NO_RELOAD (#2643)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-03-07 20:12:54 +00:00
Nguyen Phuong An
e78d9a7893 Remove some duplicate worlds (#2582)
Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
2019-02-20 07:12:21 -05:00
mrasu
362d7e96dc plugin/auto: Reload zones every one minute (#2516)
Automatically submitted.
2019-02-17 14:51:47 +00:00
Miek Gieben
9c16ed1d14
Default to upstream to self (#2436)
* Default to upstream to self

This is a backwards incompatible change.

This is a massive (cleanup) PR where we default to resolving external
names by the coredns process itself, instead of directly forwarding them
to some upstream.

This ignores any arguments `upstream` may have had and makes it depend
on proxy/forward configuration in the Corefile. This allows resolved
upstream names to be cached and we have better healthchecking of the
upstreams. It also means there is only one way to resolve names, by
either using the proxy or forward plugin.

The proxy/forward lookup.go functions have been removed. This also
lessen the dependency on proxy, meaning deprecating proxy will become
easier. Some tests have been removed as well, or moved to the top-level
test directory as they now require a full coredns process instead of
just the plugin.

For the etcd plugin, the entire StubZone resolving is *dropped*! This
was a hacky (but working) solution to say the least. If someone cares
deeply it can be brought back (maybe)?

The pkg/upstream is now very small and almost does nothing. Also the
New() function was changed to return a pointer to upstream.Upstream. It
also returns only one parameter, so any stragglers using it will
encounter a compile error.

All documentation has been adapted. This affected the following plugins:
* etcd
* file
* auto
* secondary
* federation
* template
* route53

A followup PR will make any upstream directives with arguments an error,
right now they are ignored.

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

* Fix etcd build - probably still fails unit test

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

* Slightly smarter lookup check in upstream

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

* Compilez

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13 16:54:49 +00:00
Isolus
7642995558 disable ra flag for several plugins (#2408)
* disable ra flag for several plugins

* removed unnecessary assignment

* removed more unnecessary assignments
2018-12-30 17:05:08 +01:00
Sandeep Rajan
c3d69bec31 fix formatting (#2302) 2018-11-13 16:46:48 -05:00
Manuel Stocker
4b1b0ec9e6 Use filepath when manipulating file paths (#2221)
Automatically submitted.
2018-10-21 13:59:37 +00:00
Yong Tang
54df160aa4
Remove whitespace and pass presubmit (#2217)
While running the following, noticed the whitespace warning from presubmit:
```
ubuntu@ubuntu:~/coredns$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns --net=host golang:1.11
root@ubuntu:/go# cd src/github.com/coredns/coredns/
root@ubuntu:/go/src/github.com/coredns/coredns# make
** presubmit/context
** presubmit/filename-hyphen
** presubmit/test-lowercase
** presubmit/trailing-whitespace
plugin/auto/README.md:* `reload` interval to perform reload of zone if SOA version changes. Default is one minute.
plugin/auto/README.md:  Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds
plugin/file/README.md:* `reload` interval to perform reload of zone if SOA version changes. Default is one minute.
plugin/file/README.md:  Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds
** presubmit/trailing-whitespace: please remove any trailing white space
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-10-19 10:58:36 -07:00
marqc
552aab723c Configurable zone reload interval in file plugin (#2110)
* Configurable zone reload interval in file plugin

* passing reload config from auto plugin to file plugin. removed noReload property from Zone struct. fixed tests based on short file reload hack
2018-09-29 16:50:49 +01:00
Miek Gieben
ba1efee4f1
Default to scrubbing replies in the server (#2012)
Every plugin needs to deal with EDNS0 and should call Scrub to make a
message fit the client's buffer. Move this functionality into the server
and wrapping the ResponseWriter into a ScrubWriter that handles these
bits for us. Result:

Less code and faster, because multiple chained plugins could all be
calling scrub and SizeAndDo - now there is just one place.

Most tests in file/* and dnssec/* needed adjusting because in those unit
tests you don't see OPT RRs anymore. The DNSSEC signer was also looking
at the returned OPT RR to see if it needed to sign - as those are now
added by the server (and thus later), this needed to change slightly.

Scrub itself still exist (for backward compat reasons), but has been
made a noop. Scrub has been renamed to scrub as it should not be used by
external plugins.

Fixes: #2010

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-08-29 12:26:22 +01:00
Karsten Weiss
6d8a078704 Typo fixes (#2031) 2018-08-14 08:55:55 -07:00
Miek Gieben
f3134da45e
Clean up tests logging (#1979)
* Clean up tests logging

This cleans up the travis logs so you can see the failures better.

Older tests in tests/ would call log.SetOutput(ioutil.Discard) in
a haphazard way. This add log.Discard and put an `init` function in each
package's dir (no way to do this globally). The cleanup in tests/ is
clear.

All plugins also got this init function to have some uniformity and kill
any (future) logging there in the tests as well.

There is a one-off in pkg/healthcheck because that does log.

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

* bring back original log_test.go

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

* suppress logging here as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-19 16:23:06 +01:00
Joey Espinosa
c2780f42c4 Updating filepath in auto plugin if existing zone's file changes location (#1901) (#1910)
Exporting Zone.File to avoid getters and setters

Updating getter and setter for Zone.File to be less racy

Renaming GetFile to File in zone plugin
2018-07-03 11:20:39 +01:00
Miek Gieben
177e32b62e plugin/forward: add REFUSED test (#1878)
add a test to see if we copy the rcode correctly. Some minor cleanup in
import ordering and renaming NewUpstream to New as we already are in the
upstream package.
2018-06-15 08:12:56 -07:00
Miek Gieben
5735292406
Do Compress only when need in request.Scrub (#1760)
* Remove Compress by default

Set Compress = true in Scrub only when the message doesn not fit the
advertized buffer. Doing compression is expensive, so try to avoid it.

Master vs this branch
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2   	   50000	     24774 ns/op

pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2   	  100000	     21960 ns/op

* and make it compile
2018-05-01 21:04:06 +01:00
Miek Gieben
12b2ff9740
Use logging (#1718)
* update docs

* plugins: use plugin specific logging

Hooking up pkg/log also changed NewWithPlugin to just take a string
instead of a plugin.Handler as that is more flexible and for instance
the Root "plugin" doesn't implement it fully.

Same logging from the reload plugin:

.:1043
2018/04/22 08:56:37 [INFO] CoreDNS-1.1.1
2018/04/22 08:56:37 [INFO] linux/amd64, go1.10.1,
CoreDNS-1.1.1
linux/amd64, go1.10.1,
2018/04/22 08:56:37 [INFO] plugin/reload: Running configuration MD5 = ec4c9c55cd19759ea1c46b8c45742b06
2018/04/22 08:56:54 [INFO] Reloading
2018/04/22 08:56:54 [INFO] plugin/reload: Running configuration MD5 = 9e2bfdd85bdc9cceb740ba9c80f34c1a
2018/04/22 08:56:54 [INFO] Reloading complete

* update docs

* better doc
2018-04-22 21:40:33 +01:00
Miek Gieben
0930eb8beb
all: fix plugin import ordering (#1717)
Got a bit messed up with stb lib "context" usage.
2018-04-22 08:34:35 +01:00
Miek Gieben
8722336fff
global: move to context (#1699)
* global: move to context

Move from golang.org/x/net/context to std lib's context.

Change done with:

for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done
for i in **/*.go; do goimports -w $i; done

* drop from dns.pb.go as well
2018-04-20 11:01:06 +01:00