...

Text file src/go/doc/comment/mkstd.sh

Documentation: go/doc/comment

     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(
    12echo "// 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
    19package comment
    20
    21var stdPkgs = []string{"
    22go list std | grep -v / | sort | sed 's/.*/"&",/'
    23echo "}"
    24) | gofmt >std.go.tmp && mv std.go.tmp std.go

View as plain text