Format RR.

master
Philippe Pittoli 2023-05-08 16:17:01 +02:00
parent fe48c1412d
commit b937953efb
1 changed files with 6 additions and 6 deletions

View File

@ -48,7 +48,7 @@ class DNSManager::Storage::Zone
end
def to_s(io : IO)
io << "#{@name} #{@ttl} IN #{@rrtype.upcase} #{@target}\n"
io << "#{ "%30s" % @name} #{ "%6d" % @ttl} IN #{ "%10s" % @rrtype.upcase} #{ "%30s" % @target}\n"
end
end
@ -69,10 +69,10 @@ class DNSManager::Storage::Zone
def to_s(io : IO)
io << "#{name} #{ttl} #{target} #{@rrtype.upcase} (#{mname} #{rname}\n"
io << "\t\t#{serial}; serial\n"
io << "\t\t#{refresh}; refresh\n"
io << "\t\t#{retry}; retry\n"
io << "\t\t#{expire}; expire\n"
io << "\t\t#{ "%10d" % serial} ; serial\n"
io << "\t\t#{ "%10d" % refresh} ; refresh\n"
io << "\t\t#{ "%10d" % retry} ; retry\n"
io << "\t\t#{ "%10d" % expire} ; expire\n"
io << "\t)\n"
end
@ -223,7 +223,7 @@ class DNSManager::Storage::Zone
end
def to_s(io : IO)
io << "#{@name} #{@ttl} IN #{@rrtype.upcase} #{@priority} #{@target}\n"
io << "#{ "%30s" % @name} #{ "%6d" % @ttl} IN MX #{ "%3d" % @priority} #{ "%30s" % @target}\n"
end
def get_errors : Array(Error)