concourse / concourse

Unused method receiver RVV-B0013
Bug risk
Major
4 months ago3 years old
Method receiver 's' is not referenced in method's body, consider removing it
 18	return &userNamespace{}
 19}
 20
 21func (s *userNamespace) MaxValidIds() (uint32, uint32, error) { 22	maxValidUid, err := maxValidFromFile(uidMap)
 23	if err != nil {
 24		return 0, 0, err
Method receiver 's' is not referenced in method's body, consider removing it
 89	}
 90}
 91
 92func (s *SpecSuite) TestIDMappings() { 93	// TODO
 94	//
 95	// ensure that we mutate the right thing
Method receiver 'r' is not referenced in method's body, consider removing it
101// If username is a numeric user id or group id, it won't be evaluated but the metadata will be filled.
102// e.g. username = "1001" will produce user with UID 1007.
103// This is useful when an image doesn't have an /etc/passwd such as distroless images.
104func (r rootfsManager) LookupUser(rootfsPath string, username string) (specs.User, bool, error) {105	passwdPath := filepath.Join(rootfsPath, "etc", "passwd")
106	groupPath := filepath.Join(rootfsPath, "etc", "group")
107
Method receiver 'p' is not referenced in method's body, consider removing it
44//
45// [1]: https://github.com/concourse/concourse/issues/4477
46//
47func (p processKiller) Kill(48	ctx context.Context,
49	proc containerd.Process,
50	signal syscall.Signal,
Method receiver 'p' is not referenced in method's body, consider removing it
79
80// Signal - Not Implemented
81//
82func (p *Process) Signal(signal garden.Signal) (err error) {83	err = ErrNotImplemented
84	return
85}