func interactiveUnexport(u *unexporter.Unexporter) { reader := bufio.NewReader(os.Stdin) exports := u.UnexportableObjects() for _, o := range exports { if u.IsNameExcluded(o.Name()) { continue } printObject(u, o) fmt.Printf("Unexport this [yN]: ") text, _ := reader.ReadString('\n') if strings.TrimSpace(text) != "y" { u.ExcludedNames = append(u.ExcludedNames, o.Name()) } } u.Unexport() }