3.4. 简化代码download PDF 您可以使用 gofmt 格式工具来简化代码。 流程 要简化给定路径中的 anf 格式代码,请运行: 在 Red Hat Enterprise Linux 8 中: $ gofmt -s -w <code_path> 将 <code_path > 替换为您要简化的代码的路径。 在 Red Hat Enterprise Linux 9 中: $ gofmt -s -w <code_path> 将 <code_path > 替换为您要简化的代码的路径。 前一个下一个