{"id":18098639,"url":"https://github.com/olehan/marker","last_synced_at":"2025-04-06T04:18:27.575Z","repository":{"id":143943755,"uuid":"201775505","full_name":"olehan/marker","owner":"olehan","description":"✏️ Work with Golang plugins easier","archived":false,"fork":false,"pushed_at":"2019-08-13T11:17:15.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T10:19:25.483Z","etag":null,"topics":["go","go-module","go-plugins","golang","marker"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olehan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-11T14:31:50.000Z","updated_at":"2019-08-13T11:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c557d9fd-e34b-4ec4-843a-7c9aa914a8f5","html_url":"https://github.com/olehan/marker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehan%2Fmarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehan%2Fmarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehan%2Fmarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olehan%2Fmarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olehan","download_url":"https://codeload.github.com/olehan/marker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247431046,"owners_count":20937887,"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":["go","go-module","go-plugins","golang","marker"],"created_at":"2024-10-31T20:12:16.459Z","updated_at":"2025-04-06T04:18:27.553Z","avatar_url":"https://github.com/olehan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e✏️ Marker\u003c/h1\u003e\n\u003cp align=\"center\"\u003eMark your golang plugin file to get the best of it\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/olehan/marker\"\u003e\n        \u003cimg alt=\"Marker Travis Status\" src=\"https://img.shields.io/travis/olehan/marker?logo=travis\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/olehan/marker\"\u003e\n        \u003cimg alt=\"Marker Code Coverage\" src=\"https://codecov.io/gh/olehan/marker/branch/master/graph/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/olehan/marker/blob/master/LICENSE\"\u003e\n        \u003cimg alt=\"Marker License\" src=\"https://img.shields.io/github/license/olehan/marker.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/olehan/marker/releases\"\u003e\n        \u003cimg alt=\"Marker Last Release\" src=\"https://img.shields.io/github/tag/olehan/marker.svg?label=release\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n----\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/strong\u003e\n    |\n    \u003cstrong\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/strong\u003e\n    |\n    \u003cstrong\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n----\n\nI know that this (✏️) is not a marker, but I do not have anything better ＼(￣▽￣)／\n\n\u003ch2 id=\"usage\"\u003eUsage\u003c/h2\u003e\n\n*Actually I'd suggest you to go into the [examples directory](examples) to see more usage\nvariations.*\n\n***Project:***\n```\nproject\n├── config.go\n└── app/\n    └── main.go\n```\n\n***config.go***\n```go\npackage main // Notice that the package has to be main to build a plugin.\n\n// Variables and functions also have to be public to import them using marker. \nvar ApiUrl = \"https://api.github.com\"\n```\n\n***app/main.go***\n```go\npackage main\n \nimport (\n    \"fmt\"\n    \"github.com/olehan/marker\"\n    \"github.com/olehan/marker/path\"\n)\n\nfunc main() {\n    // Here we're marking our file as a plugin and telling the marker what we need\n    // and what it should be.\n    output, err := marker.Mark(\n        path.RelativeToCaller(\"../config.go\"),\n        // We're specifying the variable's name and its type so marker could\n        // validate the value that was imported from the plugin.\n        marker.NewMarker(\"ApiUrl\", marker.StringValue),\n    )\n\n    if err != nil {\n        panic(err)\n    }\n\n    // Symbol's always pointer.\n    apiUrl := output.(*string)   \n    fmt.Println(\"apiUrl:\", *apiUrl)\n}\n```\n\n\n\u003ch2 id=\"installation\"\u003eInstallation\u003c/h2\u003e\n\n```sh\n$ go get github.com/olehan/marker\n```\n\n\n\u003ch2 id=\"license\"\u003eLicense\u003c/h2\u003e\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folehan%2Fmarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folehan%2Fmarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folehan%2Fmarker/lists"}