dotenv, parsing fix email, moved dump tracnsport to new file gz, removed unwanted var jwt, added in HS256 sign/parse

ptr, ref and deref funcs response, use fmt.Fprint(f) validate, few new funcs
This commit is contained in:
2025-10-03 00:12:00 +05:30
parent 74e56f55d6
commit 6f9fb2d8ec
14 changed files with 262 additions and 65 deletions

30
open/open_windows.go Normal file
View File

@@ -0,0 +1,30 @@
package open
import (
"os"
"os/exec"
"path/filepath"
"strings"
)
var (
cmd = "url.dll,FileProtocolHandler"
runDll32 = filepath.Join(os.Getenv("SYSTEMROOT"), "System32", "rundll32.exe")
)
func cleaninput(input string) string {
r := strings.NewReplacer("&", "^&")
return r.Replace(input)
}
func open(input string) *exec.Cmd {
cmd := exec.Command(runDll32, cmd, input)
// cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
return cmd
}
func openWith(input string, appName string) *exec.Cmd {
cmd := exec.Command("cmd", "/C", "start", "", appName, cleaninput(input))
// cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
return cmd
}