func (imd *Directory) Subdir(name ...string) *Directory {
	i := imd

	for _, n := range name {
		i2 := i.children.FindByName(n)
		if i2 == nil {
			panic(fmt.Sprintf("'%s' not found in '%s'", n, i.Name()))
		}

		if !i2.IsDir() {
			panic(fmt.Sprintf("'%s' is not a directory in '%s'", n, i.Name()))
		}

		// nolint:forcetypeassert
		i = i2.(*Directory)
	}

	return i
}
// Subdir finds a subdirectory with a given name.
Subdir finds a subdirectory with a given name.
// Subdir finds a subdirectory with a given name .
func (imd *Directory) Subdir(name ...string) *Directory {
	i := imd
	for _, n := range name {
		i2 := i.children.FindByName(n)
		if i2 == nil {
			panic(fmt.Sprintf("'%s' not found in '%s'", n, i.Name()))
		}
		if !i2.IsDir() {
			panic(fmt.Sprintf("'%s' is not a directory in '%s'", n, i.Name()))
		}
		i = i2.(*Directory)
	}
	return i
}
func ( imd * Directory ) Subdir ( name ... string ) * Directory { i := imd for _ , n := range name { i2 := i . children . FindByName ( n ) if i2 == nil { panic ( fmt . Sprintf ( " " , n , i . Name ( ) ) ) } if ! i2 . IsDir ( ) { panic ( fmt . Sprintf ( " " , n , i . Name ( ) ) ) } i = i2 . ( * Directory ) } return i }
Subdir finds a subdirectory with a given name.
Subdir finds a subdirectory with a given name .
// nolint:forcetypeassert