mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-31 13:16:14 +08:00
# Issue Fixes https://github.com/StackExchange/dnscontrol/issues/3912 # Resolution ``` #!/bin/sh # Reset git fetch origin main git reset --hard origin/main git checkout main git branch -D tlim_moveproviders git checkout -b tlim_moveproviders find . -name \*.bak -delete # Move the *.go files out of providers/ mkdir -p pkg/providers git mv providers/*.go pkg/providers # move the _all file out of providers/ git mv providers/_all pkg/providers/_all # Update the imports (in go.* and the affected files) sed -i.bak -e 's@"github.com/StackExchange/dnscontrol/v4/providers"@"github.com/StackExchange/dnscontrol/v4/pkg/providers"@g' go.* $(fgrep -lr --include '*.go' '"github.com/StackExchange/dnscontrol/v4/providers"' *) sed -i.bak -e 's@"../../providers"@"../../pkg/providers"@g' pkg/normalize/capabilities_test.go sed -i.bak -e 's@"github.com/StackExchange/dnscontrol/v4/providers/_all"@"github.com/StackExchange/dnscontrol/v4/pkg/providers/_all"@g' go.* $(fgrep -lr --include '*.go' '"github.com/StackExchange/dnscontrol/v4/providers/_all"' *) # Fix the docs sed -i.bak -e 's@StackExchange/dnscontrol/blob/main/providers/_all/all.go@StackExchange/dnscontrol/blob/main/pkg/providers/_all/all.go@g' documentation/advanced-features/writing-providers.md sed -i.bak -e 's@StackExchange/dnscontrol/providers@StackExchange/dnscontrol/pkg/providers@g' documentation/advanced-features/writing-providers.md sed -i.bak -e 's@StackExchange/dnscontrol/v4/providers@StackExchange/dnscontrol/v4/pkg/providers@g' documentation/advanced-features/writing-providers.md sed -i.bak -e 's@dnscontrol/providers/providers.go@dnscontrol/pkg/providers/providers.go@g' documentation/advanced-features/writing-providers.md sed -i.bak -e 's@providers/_all/all.go@pkg/providers/_all/all.go@g' documentation/advanced-features/writing-providers.md #sed -i.bak -e 's@@@g' documentation/advanced-features/writing-providers.md #sed -i.bak -e 's@@@g' documentation/advanced-features/writing-providers.md find . -name \*.bak -delete go fmt ./... git status echo git commit -a -m'CHORE: Move Non-provider files in providers to pkg/providers' ```
53 lines
1.8 KiB
Go
53 lines
1.8 KiB
Go
// Code generated by "stringer -type=Capability"; DO NOT EDIT.
|
|
|
|
package providers
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[CanAutoDNSSEC-0]
|
|
_ = x[CanConcur-1]
|
|
_ = x[CanGetZones-2]
|
|
_ = x[CanOnlyDiff1Features-3]
|
|
_ = x[CanUseAKAMAICDN-4]
|
|
_ = x[CanUseAlias-5]
|
|
_ = x[CanUseAzureAlias-6]
|
|
_ = x[CanUseCAA-7]
|
|
_ = x[CanUseDHCID-8]
|
|
_ = x[CanUseDNAME-9]
|
|
_ = x[CanUseDS-10]
|
|
_ = x[CanUseDSForChildren-11]
|
|
_ = x[CanUseHTTPS-12]
|
|
_ = x[CanUseLOC-13]
|
|
_ = x[CanUseNAPTR-14]
|
|
_ = x[CanUsePTR-15]
|
|
_ = x[CanUseRoute53Alias-16]
|
|
_ = x[CanUseRP-17]
|
|
_ = x[CanUseSMIMEA-18]
|
|
_ = x[CanUseSOA-19]
|
|
_ = x[CanUseSRV-20]
|
|
_ = x[CanUseSSHFP-21]
|
|
_ = x[CanUseSVCB-22]
|
|
_ = x[CanUseTLSA-23]
|
|
_ = x[CanUseDNSKEY-24]
|
|
_ = x[CanUseOPENPGPKEY-25]
|
|
_ = x[DocCreateDomains-26]
|
|
_ = x[DocDualHost-27]
|
|
_ = x[DocOfficiallySupported-28]
|
|
_ = x[CanUseAKAMAITLC-29]
|
|
}
|
|
|
|
const _Capability_name = "CanAutoDNSSECCanConcurCanGetZonesCanOnlyDiff1FeaturesCanUseAKAMAICDNCanUseAliasCanUseAzureAliasCanUseCAACanUseDHCIDCanUseDNAMECanUseDSCanUseDSForChildrenCanUseHTTPSCanUseLOCCanUseNAPTRCanUsePTRCanUseRoute53AliasCanUseRPCanUseSMIMEACanUseSOACanUseSRVCanUseSSHFPCanUseSVCBCanUseTLSACanUseDNSKEYCanUseOPENPGPKEYDocCreateDomainsDocDualHostDocOfficiallySupportedCanUseAKAMAITLC"
|
|
|
|
var _Capability_index = [...]uint16{0, 13, 22, 33, 53, 68, 79, 95, 104, 115, 126, 134, 153, 164, 173, 184, 193, 211, 219, 231, 240, 249, 260, 270, 280, 292, 308, 324, 335, 357, 372}
|
|
|
|
func (i Capability) String() string {
|
|
idx := int(i) - 0
|
|
if i < 0 || idx >= len(_Capability_index)-1 {
|
|
return "Capability(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
return _Capability_name[_Capability_index[idx]:_Capability_index[idx+1]]
|
|
}
|