{"id":16828094,"url":"https://github.com/kataras/vscode-iris","last_synced_at":"2025-04-11T03:51:02.267Z","repository":{"id":73636848,"uuid":"118500021","full_name":"kataras/vscode-iris","owner":"kataras","description":"Iris Web Framework snippets for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2022-01-07T00:06:20.000Z","size":554,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T01:51:10.446Z","etag":null,"topics":["go","golang","iris","iris-golang","vscode","vscode-extension","vscode-snippets"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=kataras2006.iris","language":"TypeScript","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/kataras.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-22T18:50:05.000Z","updated_at":"2025-02-11T21:33:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"b47698e9-fe2f-46b2-baba-78a373290efa","html_url":"https://github.com/kataras/vscode-iris","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/kataras%2Fvscode-iris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fvscode-iris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fvscode-iris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fvscode-iris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kataras","download_url":"https://codeload.github.com/kataras/vscode-iris/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339262,"owners_count":21087214,"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","golang","iris","iris-golang","vscode","vscode-extension","vscode-snippets"],"created_at":"2024-10-13T11:24:38.832Z","updated_at":"2025-04-11T03:51:02.260Z","avatar_url":"https://github.com/kataras.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iris for Visual Studio Code\n\nFor the moment, the Iris extension provides some very useful code snippets to reduce the time you spend to write common [Iris](https://iris-go.com) Go code inside the [Microsoft's Visual Studio Code](https://code.visualstudio.com/), which is the best code editor for the [Go Language](https://golang.org).\n\nSnippets section contains the documentation for each snippet(word that is auto-completed by the Visual Studio Code's editor when you type its prefix, with the key `\u003ctab\u003e` you can actually apply the code that is referring to the snippet and by pressing `\u003ctab\u003e` again you can change the _default values_ for each code snippet's body).\n\nThe Iris extension will install the [vscode-go](https://github.com/golang/vscode-go) extension automatically for you, if it is not there already.\n\n## Snippets\n\n### pc\n\n```go\napp.PartyConfigure(\"/\", new(users.API))\n\n```\n\n### api\n\n```go\npackage api\n\nimport (\n\t\"github.com/kataras/iris/v12\"\n)\n\ntype API struct {\n}\n\nfunc (api *API) Configure(r iris.Party) {\n\t\n}\n```\n\n### helloweb\n\n```go\npackage main\n\nimport (\n    \"time\"\n\n    \"github.com/kataras/iris/v12\"\n)\n\nfunc greet(ctx iris.Context) {\n    ctx.Writef(\"Hello World! %s\", time.Now())\n}\n\nfunc main() {\n    app := iris.New()\n    app.Get(\"/\", greet)\n    app.Listen(\":8080\")\n}\n```\n\n### newapp\n\n```go\napp := iris.New()\n\n\napp.Run(iris.Addr(\":8080\"))\n```\n\n### newsessions\n\n```go\nsessionsManager := sessions.New(sessions.Config{\n    Cookie: \"cookieName\",\n})\n```\n\n### regview\n\n```go\napp.RegisterView(iris.HTML(\"./views\", \".html\"))\n```\n\n### handledir\n\n```go\napp.HandleDir(\"/path\", \"./directory\")\n```\n\n### staticembedded\n\n```go\napp.HandleDir(\"/path\", \"./directory\", iris.DirOptions{Asset: Asset, AssetNames: AssetNames})\n```\n\n### fav\n\n```go\napp.Favicon(\"./public/favicon.ico\")\n```\n\n### hf\n\n```go\nfunc(ctx iris.Context) {\n\n}\n```\n\n### handle\n\n```go\napp.Handle(\"GET\", \"/path\", func(ctx iris.Context) {\n\n})\n```\n\n### get\n\n```go\napp.Get(\"/path\", func(ctx iris.Context) {\n\n})\n```\n\n### post\n\n```go\napp.Post(\"/path\", func(ctx iris.Context) {\n\n})\n```\n\n### put\n\n```go\napp.Put(\"/path\", func(ctx iris.Context) {\n\n})\n```\n\n### delete\n\n```go\napp.Delete(\"/path\", func(ctx iris.Context) {\n\n})\n```\n\n## Install from Marketplace\n\nJust click the link below and press the **Install** button, [vs code](https://code.visualstudio.com/) will open and ask you if you want to install the extension.\n\n\u003chttps://marketplace.visualstudio.com/items?itemName=kataras2006.iris\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Fvscode-iris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkataras%2Fvscode-iris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Fvscode-iris/lists"}