terraform/internal/command/webbrowser/native.go
2026-02-17 13:56:34 +00:00

21 lines
497 B
Go

// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1
package webbrowser
import (
"github.com/pkg/browser"
)
// NewNativeLauncher creates and returns a Launcher that will attempt to interact
// with the browser-launching mechanisms of the operating system where the
// program is currently running.
func NewNativeLauncher() Launcher {
return nativeLauncher{}
}
type nativeLauncher struct{}
func (l nativeLauncher) OpenURL(url string) error {
return browser.OpenURL(url)
}