github.com/bir3/gocompiler@v0.9.2202/src/go/doc/comment/mkstd.sh (about) 1 #!/bin/bash 2 # Copyright 2022 The Go Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 6 # This could be a good use for embed but go/doc/comment 7 # is built into the bootstrap go command, so it can't use embed. 8 # Also not using embed lets us emit a string array directly 9 # and avoid init-time work. 10 11 ( 12 echo "// Copyright 2022 The Go Authors. All rights reserved. 13 // Use of this source code is governed by a BSD-style 14 // license that can be found in the LICENSE file. 15 16 // Code generated by 'go generate' DO NOT EDIT. 17 //go:generate ./mkstd.sh 18 19 package comment 20 21 var stdPkgs = []string{" 22 go list std | grep -v / | sort | sed 's/.*/"&",/' 23 echo "}" 24 ) | gofmt >std.go.tmp && mv std.go.tmp std.go