• मौजूदा gofmt के साथ backward compatible रहते हुए ज्यादा सख्त नियम लागू करने वाला formatter
  • gofmt द्वारा स्वीकार किए जाने वाले format का subset होने के कारण इसे drop-in replacement के रूप में इस्तेमाल किया जा सकता है; gofumpt चलाने के बाद gofmt चलाने पर कोई बदलाव नहीं होगा
  • सिर्फ gofmt से न पकड़ी जाने वाली style variations को अपने आप uniform करता है
    • अनावश्यक blank lines, spaces, parentheses आदि अपने आप हटाता है
    • imports में standard library को अलग group में बांटता है
    • var s = "x"s := "x", 07550o755, //Foo// Foo
    • composite literals में line breaks की consistency समेत कई अतिरिक्त formatting rules लागू करता है
  • vendor, testdata directories को explicit argument न होने पर skip करता है, और generated Go files पर भी अतिरिक्त rules लागू नहीं करता
  • go.mod के ignore directive का पालन करता है
  • “gofmt के ऊपर बनाने के बजाय इसे replace करने की वजह?”
    • design खुद gofmt के ऊपर built है, और gofmt formatting से टकराने वाले rules नहीं जोड़े जाते — यह competition नहीं, extension है
    • editor/scripts में drop-in replacement के तौर पर इस्तेमाल करने के लिए यह gofmt की modified copy का रूप लेता है

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.