You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/command/webbrowser/native.go

22 lines
497 B

// 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)
}