internal/bunny: fix root record handling. acb21849 parent dd0df479

Two issues: * We would get a crash in extractRecordComponents because, e.g. if there's a zone "kivikakk.ee" and dnsName itself *is* "kivikakk.ee", we'd try to calculate `dnsName[:-1]` and panic. * Having fixed that, the subsequent call to `recordToEndpoint` with domain "" would produce the dnsName ".kivikakk.ee". This would produce very unpredictable results.

authored by ~talya

1
# If you prefer the allow list template instead of the deny list, see community template:
2
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3
#
4
# Binaries for programs and plugins
5
*.exe
6
*.exe~
7
*.dll
8
*.so
9
*.dylib
10
11
# Test binary, built with `go test -c`
12
*.test
13
14
# Output of the go coverage tool, specifically when used with LiteIDE
15
*.out
16
17
# Dependency directories (remove the comment below to include it)
18
# vendor/
19
20
# Go workspace file
21
go.work
22
go.work.sum
23
24
# env file
25
.env
26
27
# Local scratch space for tests
28
.local
29
30
# Nix build result
31
/result
32