3 // Copyright 2012 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Issue 3890: missing detection of init cycle involving
8 // method calls in function bodies.
12 var commandLine = NewFlagSet() // ERROR "initialization cycle|depends upon itself"
17 func (f *FlagSet) failf(format string, a ...interface{}) {
21 func (f *FlagSet) usage() {
27 func NewFlagSet() *FlagSet {
29 f.setErrorHandling(true)
33 func (f *FlagSet) setErrorHandling(b bool) {