{"id":13740489,"url":"https://github.com/inkeliz/giohyperlink","last_synced_at":"2025-04-15T23:52:24.188Z","repository":{"id":45944799,"uuid":"311489923","full_name":"inkeliz/giohyperlink","owner":"inkeliz","description":"Brings the \u003ca href\u003e to Gio. Small library to open URLs, supports Android, Windows, Linux, FreeBSD, iOS, macOS and WASM","archived":false,"fork":false,"pushed_at":"2022-09-03T21:54:51.000Z","size":86,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-22T12:31:53.775Z","etag":null,"topics":["browser","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inkeliz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-09T23:20:58.000Z","updated_at":"2024-05-22T12:31:53.775Z","dependencies_parsed_at":"2022-09-13T02:12:57.969Z","dependency_job_id":null,"html_url":"https://github.com/inkeliz/giohyperlink","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeliz%2Fgiohyperlink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeliz%2Fgiohyperlink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeliz%2Fgiohyperlink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkeliz%2Fgiohyperlink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inkeliz","download_url":"https://codeload.github.com/inkeliz/giohyperlink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173061,"owners_count":21224481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","golang"],"created_at":"2024-08-03T04:00:48.542Z","updated_at":"2025-04-15T23:52:24.170Z","avatar_url":"https://github.com/inkeliz.png","language":"Go","readme":"GioHyperlink\n--------\n\nOpens a hyperlink in the default browser. 🤩\n\n## Setup\n\nFirst, you need to `go get github.com/inkeliz/giohyperlink`, then you need to provide `giohyperlink` access to the Window events, so you need to add the following to your main loop function:\n\n```rust\n\n```diff\n for evt := range w.Events() { // Gio main event loop\n+    giohyperlink.ListenEvents(e)\n\n    switch evt := evt.(type) {\n        // ...\n    }\n}\n```\n\n\u003e _⚠️In some OSes (Windows, macOS...) this setup is optional, but it's recommended to do it anyway._\n\n## Usage\n\nTo open one link, you can use the `Open` function:\n\n```go\ngiohyperlink.Open(\"https://github.com\")\n```\n\nThat will open the link in the default browser. You can use `OpenURL` to open a `*url.URL`:\n\n```go\ngiohyperlink.OpenURL(\u0026url.URL{\n    Scheme: \"https\",\n    Host:   \"github.com\",\n})\n```\n\nBy default only HTTP and HTTPS links are allowed, but you can change that by changing `InsecureIgnoreScheme` to `true`,\nyou should validate the URL and scheme on your own.\n","funding_links":[],"categories":["Gio Core"],"sub_categories":["Community Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkeliz%2Fgiohyperlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkeliz%2Fgiohyperlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkeliz%2Fgiohyperlink/lists"}