package script

import (
	"fmt"
	"os"
	"time"
)

// 工具函数
func generateID() string {
	return fmt.Sprintf("cmd_%d", time.Now().UnixNano())
}

func getCurrentUser() string {
	if user := os.Getenv("USER"); user != "" {
		return user
	}
	if user := os.Getenv("USERNAME"); user != "" {
		return user
	}
	return "unknown"
}
