mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-18 08:29:55 +01:00
26 lines
674 B
Go
26 lines
674 B
Go
package system
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
|
|
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
|
|
)
|
|
|
|
// Info holds information about the current operating system,
|
|
// package manager and required dependancies
|
|
type Info struct {
|
|
OS *operatingsystem.OS
|
|
PM packagemanager.PackageManager
|
|
Dependencies packagemanager.DependencyList
|
|
}
|
|
|
|
// GetInfo scans the system for operating system details,
|
|
// the system package manager and the status of required
|
|
// dependancies.
|
|
func GetInfo() (*Info, error) {
|
|
var result Info
|
|
err := result.discover()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &result, nil
|
|
}
|