blob: 9ec40b41564ea2bb2593e3145e1987d68de3076b [file] [log] [blame]
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
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)
}