syncthing / syncthing

Shadowing a builtin CRT-A0001
Bug risk
Major
5 occurrences in this check
shadowing of predeclared identifier: new
411		next, ok := entry.children[key]
412
413		if !ok {
414			new := &fakeEntry{415				name:      comp,
416				entryType: fakeEntryTypeDir,
417				mode:      perm,
shadowing of predeclared identifier: new
281	if entry == nil {
282		return nil, os.ErrNotExist
283	}
284	new := &fakeEntry{285		name:  base,
286		mode:  0666,
287		mtime: time.Now(),
shadowing of predeclared identifier: new
193	name := "rename"
194
195	old := createTestFile(name, "oldfile")
196	new := "newfile"197
198	testCase := func() {
199		renameTestFile(name, old, new)
shadowing of predeclared identifier: new
586	return file
587}
588
589func renameTestFile(name string, old string, new string) {590	old = filepath.Join(name, old)
591	new = filepath.Join(name, new)
592	if err := testFs.Rename(old, new); err != nil {
shadowing of predeclared identifier: copy
230// RequiresRestartOnly returns a copy with only the attributes that require
231// restart on change.
232func (f FolderConfiguration) RequiresRestartOnly() FolderConfiguration {
233	copy := f234
235	// Manual handling for things that are not taken care of by the tag
236	// copier, yet should not cause a restart.