Method 'testFakeFSCaseInsensitive' differs only by capitalization to function 'TestFakeFSCaseInsensitive' in the same source file
296 }
297}
298
299func testFakeFSCaseInsensitive(t *testing.T, fs Filesystem) {300 bs1 := []byte("test")
301
302 err := fs.Mkdir("/fUbar", 0755)
Method 'Create' differs only by capitalization to method 'create' in the same source file
299 return new, nil
300}
301
302func (fs *fakeFS) Create(name string) (File, error) {303 entry, err := fs.create(name)
304 if err != nil {
305 return nil, err
Description
Methods or fields of struct that have names different only by capitalization could be confusing.
Bad practice
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
buildSystem string
// name of the build system to use
BuildSystem string
}
Recommended
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
internalBuildSystem string
// name of the build system to use
BuildSystem string
}