You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: kernel_dec.go
    path of file: ./repos/ipsw/cmd/ipsw/cmd/kernel
    
    the code of the file until where you have to start completion: /*
Copyright Â© 2018-2024 blacktop

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated
    
func isImg4(kcpath string) bool {
	f, err := os.Open(kcpath)
	if err != nil {
		log.Fatalf("failed to open kernelcache %s: %w", kcpath, err)
	}
	defer f.Close()
	if _, err := img4.ParseImg4(f); err == nil {
		return true
	}
	return false
}