Implements pkg/browser with three-layer pattern: IPC Bus -> Service -> Platform. Stateless service — delegates OpenURL and OpenFile to platform adapter. No queries or actions, tasks only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
11 lines
330 B
Go
11 lines
330 B
Go
// pkg/browser/platform.go
|
|
package browser
|
|
|
|
// Platform abstracts the system browser/file-opener backend.
|
|
type Platform interface {
|
|
// OpenURL opens the given URL in the default system browser.
|
|
OpenURL(url string) error
|
|
|
|
// OpenFile opens the given file path with the system default application.
|
|
OpenFile(path string) error
|
|
}
|