{"id":26022128,"url":"https://github.com/alex-leonhardt/go-decorator-pattern","last_synced_at":"2025-03-06T09:54:36.081Z","repository":{"id":73622367,"uuid":"101487014","full_name":"alex-leonhardt/go-decorator-pattern","owner":"alex-leonhardt","description":"golang and decorators / decorator patterns","archived":true,"fork":false,"pushed_at":"2017-10-31T22:35:57.000Z","size":12,"stargazers_count":136,"open_issues_count":0,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-11-07T16:55:25.193Z","etag":null,"topics":["decorator-pattern","golang","learn-to-code","learning-go","learning-golang","programming-exercise"],"latest_commit_sha":null,"homepage":"https://dev.to/ineedale","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex-leonhardt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2017-08-26T13:20:29.000Z","updated_at":"2024-06-19T10:21:39.775Z","dependencies_parsed_at":"2023-09-02T01:19:24.543Z","dependency_job_id":null,"html_url":"https://github.com/alex-leonhardt/go-decorator-pattern","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-leonhardt%2Fgo-decorator-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-leonhardt%2Fgo-decorator-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-leonhardt%2Fgo-decorator-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-leonhardt%2Fgo-decorator-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-leonhardt","download_url":"https://codeload.github.com/alex-leonhardt/go-decorator-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242187638,"owners_count":20086217,"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":["decorator-pattern","golang","learn-to-code","learning-go","learning-golang","programming-exercise"],"created_at":"2025-03-06T09:54:27.364Z","updated_at":"2025-03-06T09:54:36.061Z","avatar_url":"https://github.com/alex-leonhardt.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## golang and the decorator pattern\n\na playground for me (and maybe helpful for others?) to train the brain understand the decorator pattern better\n\n- a basic function decorator, see [example1](example1/)\n- a basic timing decorator (how long does func X take?), see [example2](example2/)\n- decorating a method (think OOP), see [example3](example3/)\n- another method decorator, but using a Func type, useful when the func signature is rather long, see [example4](example4/)\n- method decorator that takes arguments [example5](example5/)\n- return the result from the decorated function, instead of printing it [example6](example6/)\n- a logging decorator, see [example7](example7/)\n- a nested decorator example, see [example8](example8/)\n- passing data to a http handler is a little weird (to me), but a fully working example is here: [go-web-random](https://github.com/alex-leonhardt/go-web-random/blob/master/main.go#L25-L35)\n- let's play with a interface [example9](example9/)\n\n## contribute\n\npull requests are welcomed \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-leonhardt%2Fgo-decorator-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-leonhardt%2Fgo-decorator-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-leonhardt%2Fgo-decorator-pattern/lists"}