github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/pkginit/init.go (about) 1 // Copyright 2009 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package pkginit 6 7 // MakeTask makes an initialization record for the package, if necessary. 8 // See runtime/proc.go:initTask for its layout. 9 // The 3 tasks for initialization are: 10 // 1. Initialize all of the packages the current package depends on. 11 // 2. Initialize all the variables that have initializers. 12 // 3. Run any init functions. 13 func MakeTask()