concourse / concourse

Exported function returning value of unexported type RVV-B0011
Anti-pattern
Major
3 months ago3 years old
exported func NewVolumeSweeper returns unexported type *worker.volumeSweeper, which can be annoying to use
27	tsaClient TSAClient,
28	bcClient baggageclaim.Client,
29	maxInFlight uint16,
30) *volumeSweeper {31	return &volumeSweeper{
32		logger:             logger,
33		interval:           sweepInterval,
exported func NewRootfsManager returns unexported type *runtime.rootfsManager, which can be annoying to use
 68
 69// NewRootfsManager instantiates a rootfsManager
 70//
 71func NewRootfsManager(opts ...RootfsManagerOpt) *rootfsManager { 72	m := &rootfsManager{
 73		mkdirall: os.MkdirAll,
 74	}
exported func NewProcessKiller returns unexported type *runtime.processKiller, which can be annoying to use
26
27type processKiller struct{}
28
29func NewProcessKiller() *processKiller {30	return &processKiller{}
31}
32
exported func New returns unexported type *libcontainerd.client, which can be annoying to use
 84
 85var _ Client = (*client)(nil)
 86
 87func New(addr, namespace string, requestTimeout time.Duration) *client { 88	return &client{
 89		addr:           addr,
 90		namespace:      namespace,
exported func NewKiller returns unexported type *runtime.killer, which can be annoying to use
 78	}
 79}
 80
 81func NewKiller(opts ...KillerOpt) *killer { 82	k := &killer{
 83		gracePeriod:   GracePeriod,
 84		processKiller: NewProcessKiller(),