From 0a22018d461d7999df3af40cefb6ace17dfe79c0 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 11 Feb 2013 07:46:39 -0500 Subject: [PATCH] spec: reject top-level init names Fixes #4586. R=golang-dev, remyoudompheng, r CC=golang-dev https://golang.org/cl/7307082 --- doc/go_spec.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index f18585a2e9..aa4330d420 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -5472,8 +5472,10 @@ func init()

defined in its source. -A package may contain multiple -init functions, even +A package-scope or file-scope identifier +with name init may only be +declared to be a function with this signature. +Multiple such functions may be defined, even within a single source file; they execute in unspecified order.

-- 2.48.1