Format RR.

This commit is contained in:
Philippe Pittoli 2023-05-08 16:17:01 +02:00
parent fe48c1412d
commit b937953efb

View File

@ -48,7 +48,7 @@ class DNSManager::Storage::Zone
end end
def to_s(io : IO) 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
end end
@ -69,10 +69,10 @@ class DNSManager::Storage::Zone
def to_s(io : IO) def to_s(io : IO)
io << "#{name} #{ttl} #{target} #{@rrtype.upcase} (#{mname} #{rname}\n" io << "#{name} #{ttl} #{target} #{@rrtype.upcase} (#{mname} #{rname}\n"
io << "\t\t#{serial}; serial\n" io << "\t\t#{ "%10d" % serial} ; serial\n"
io << "\t\t#{refresh}; refresh\n" io << "\t\t#{ "%10d" % refresh} ; refresh\n"
io << "\t\t#{retry}; retry\n" io << "\t\t#{ "%10d" % retry} ; retry\n"
io << "\t\t#{expire}; expire\n" io << "\t\t#{ "%10d" % expire} ; expire\n"
io << "\t)\n" io << "\t)\n"
end end
@ -223,7 +223,7 @@ class DNSManager::Storage::Zone
end end
def to_s(io : IO) 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 end
def get_errors : Array(Error) def get_errors : Array(Error)