talos/internal/pkg/smbios/smbios.go
Andrey Smirnov 06f76bfebb
chore: bump dependencies
Update to some dependencies moved to siderolabs/ path.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-10-04 14:47:27 +04:00

27 lines
547 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package smbios
import (
"sync"
"github.com/siderolabs/go-smbios/smbios"
)
var (
syncSMBIOS sync.Once
connSMBIOS *smbios.SMBIOS
errSMBIOS error
)
// GetSMBIOSInfo returns the SMBIOS info.
func GetSMBIOSInfo() (*smbios.SMBIOS, error) {
syncSMBIOS.Do(func() {
connSMBIOS, errSMBIOS = smbios.New()
})
return connSMBIOS, errSMBIOS
}