Skip to content

Cross-platform method to open a browser, with platform compatibility enforced at compile-time

Notifications You must be signed in to change notification settings

oogali/go-open-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-open-browser

Small cross-platform utility library to open a browser to a target URL.

I prefer a compilation failure versus a runtime error.

Through the power of Go's build constraints, its primary value is it will not compile for any platform it does not support.

Supported Platforms

  • MacOS (via open)
  • Windows (via [email protected])
  • Linux (via xdg-open)
  • FreeBSD (via xdg-open)
  • NetBSD (via xdg-open)
  • OpenBSD (via xdg-open)

Inspired by

I saw @mattn's pattern for opening a browser window and thought it's something I would like to reuse but in a more strict fashion.

About

Cross-platform method to open a browser, with platform compatibility enforced at compile-time

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages