nacos-group / nacos-coredns-plugin

Nacos DNS-F Client Based On CoreDNS
Apache License 2.0
83 stars 24 forks source link

Why does this plug-in not need to modify plugin.cfg #17

Open BailinSong opened 4 years ago

BailinSong commented 4 years ago

why modify other files by "sed"

# insert nacos into plugin
sed -i '/coredns\/core\/dnsserver/a\\t_ "coredns/plugin/nacos"' core/coredns.go
sed -i '/whoami/a\\t"nacos",' core/dnsserver/zdirectives.go
sed -i '/coredns\/plugin\/whoami/a\\t_ "coredns/plugin/nacos"' core/plugin/zplugin.go

# modify import
sed -i "s/github.com\/coredns\///g" `grep 'github.com/coredns/' -rl . | grep '.go'`