mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 19:41:17 +00:00
- Replace barrel import in AuditLogPanel.tsx to fix ad-blocker crash - Remove all Enterprise/Pro badges from nav and feature headers - Simplify upgrade CTAs to clean 'Upgrade to Pro' links - Update docs: PULSE_PRO.md, API.md, README.md, SECURITY.md - Align terminology: single Pro tier, no separate Enterprise tier Also includes prior refactoring: - Move auth package to pkg/auth for enterprise reuse - Export server functions for testability - Stabilize CLI tests
37 lines
593 B
Go
37 lines
593 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"os"
|
|
|
|
"github.com/rcourtman/pulse-go-rewrite/pkg/auth"
|
|
)
|
|
|
|
var (
|
|
hashPassword = auth.HashPassword
|
|
osArgs = os.Args
|
|
osExit = os.Exit
|
|
stdout io.Writer = os.Stdout
|
|
)
|
|
|
|
func run(args []string, out io.Writer) int {
|
|
if len(args) < 2 {
|
|
fmt.Fprintln(out, "Usage: hashpw <password>")
|
|
return 1
|
|
}
|
|
|
|
password := args[1]
|
|
hash, err := hashPassword(password)
|
|
if err != nil {
|
|
fmt.Fprintf(out, "Error: %v\n", err)
|
|
return 1
|
|
}
|
|
|
|
fmt.Fprintln(out, hash)
|
|
return 0
|
|
}
|
|
|
|
func main() {
|
|
osExit(run(osArgs, stdout))
|
|
}
|