// MustOpen maximize trying to open the file
MustOpen maximize trying to open the file
// MustOpen maximize trying to open the file
func MustOpen(fileName, filePath string) (*os.File, error) {
	dir, err := os.Getwd()
	if err != nil {
		return nil, fmt.Errorf("os.Getwd err: %v", err)
	}
	src := dir + "/" + filePath
	if CheckPermission(src) {
		return nil, fmt.Errorf("file.CheckPermission Permission denied src: %s", src)
	}
	if IsNotExistMkDir(src) != nil {
		return nil, fmt.Errorf("file.IsNotExistMkDir src: %s, err: %v", src, err)
	}
	f, err := Open(src+fileName, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0644)
	if err != nil {
		return nil, fmt.Errorf("Fail to OpenFile :%v", err)
	}
	return f, nil
}
func MustOpen ( fileName , filePath string ) ( * os . File , error ) { dir , err := os . Getwd ( ) if err != nil { return nil , fmt . Errorf ( " " , err ) } src := dir + " " + filePath if CheckPermission ( src ) { return nil , fmt . Errorf ( " " , src ) } if IsNotExistMkDir ( src ) != nil { return nil , fmt . Errorf ( " " , src , err ) } f , err := Open ( src + fileName , os . O_APPEND | os . O_CREATE | os . O_RDWR , 0644 ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return f , nil }
MustOpen maximize trying to open the file
MustOpen maximize trying to open the file