{"id":42029859,"url":"https://github.com/swxctx/malatd","last_synced_at":"2026-01-26T04:33:55.446Z","repository":{"id":43267932,"uuid":"272654497","full_name":"swxctx/malatd","owner":"swxctx","description":"简洁+易用的Golang Web框架","archived":false,"fork":false,"pushed_at":"2025-10-28T03:16:58.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T05:21:39.858Z","etag":null,"topics":["go","golang","http-server","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swxctx.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-16T08:37:18.000Z","updated_at":"2025-10-28T03:17:02.000Z","dependencies_parsed_at":"2023-12-29T05:24:53.437Z","dependency_job_id":"50829421-14a0-435a-89b3-4fb420a37eb2","html_url":"https://github.com/swxctx/malatd","commit_stats":{"total_commits":81,"total_committers":3,"mean_commits":27.0,"dds":"0.024691358024691357","last_synced_commit":"1ae78ea1622aa0c48884801ae42f5062418b144c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/swxctx/malatd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swxctx%2Fmalatd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swxctx%2Fmalatd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swxctx%2Fmalatd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swxctx%2Fmalatd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swxctx","download_url":"https://codeload.github.com/swxctx/malatd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swxctx%2Fmalatd/sbom","scorecard":{"id":862418,"data":{"date":"2025-08-11","repo":{"name":"github.com/swxctx/malatd","commit":"290f3205910f2b2bc329f0f8c55d4b1a3412a2be"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T01:41:06.832Z","repository_id":43267932,"created_at":"2025-08-24T01:41:06.832Z","updated_at":"2025-08-24T01:41:06.832Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","http-server","web"],"created_at":"2026-01-26T04:33:55.367Z","updated_at":"2026-01-26T04:33:55.431Z","avatar_url":"https://github.com/swxctx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# malatd\n简洁+易用的Golang Web框架\n\n### 使用\n[查看详细使用说明](https://github.com/swxctx/malatd/tree/master/cmd)\n\n```shell\nNAME:\n   Malatd project command - A deployment tools of malatd frameware\n\nUSAGE:\n   malatd [global options] command [command options] [arguments...]\n\nVERSION:\n   1.0.0\n\nAUTHOR:\n   swxctx\n\nCOMMANDS:\n   gen      Generate a malatd project\n   run      Compile and run go project\n   doc      Generate a project README.md(malatd doc || malatd doc -r ${root_group})\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n### 普通使用\n```\npackage main\n\nimport (\n\ttd \"github.com/swxctx/malatd\"\n)\n\n/*\n\thttp://127.0.0.1:8080/malatd\n*/\nfunc main() {\n\t// new server\n\tsrv := td.NewServer(td.NewSrvConfig())\n\n\t// api router\n\tsrv.Get(\"/malatd\", malatdApi)\n\tsrv.Post(\"/malatd\", malatdApi)\n\tsrv.Run()\n}\n\n// malatd\nfunc malatdApi(ctx *td.Context) {\n\tctx.RenderString(\"malatd\")\n}\n```\n\n### 使用插件\n```\npackage main\n\nimport (\n\ttd \"github.com/swxctx/malatd\"\n)\n\n/*\n\thttp://127.0.0.1:8080/malatd?id=123\n*/\nfunc main() {\n\t// new server\n\tsrv := td.NewServer(\n\t\ttd.NewSrvConfig(),\n\t\ttokenPlugin,\n\t)\n\n\t// api router\n\tsrv.Get(\"/malatd/v1\", authPlugin, malatdApi)\n\tsrv.Run()\n}\n\n// tokenPlugin\nfunc tokenPlugin(ctx *td.Context) {\n\txlog.Infof(\"tokenPlugin: current tokenPlugin\")\n\txlog.Infof(\"tokenPlugin: Params-\u003e %v\", ctx.Request.URL.Query().Get(\"id\"))\n\tctx.Next()\n}\n\n// authHandle\nfunc authPlugin(ctx *td.Context) {\n\txlog.Infof(\"authPlugin: current authPlugin\")\n\txlog.Infof(\"authPlugin: Params-\u003e %v\", ctx.Request.URL.Query().Get(\"id\"))\n\tctx.Next()\n}\n\n// malatd\nfunc malatdApi(ctx *td.Context) {\n\txlog.Infof(\"malatdApi: current malatdApi\")\n\txlog.Infof(\"malatdApi: Params-\u003e %v\", ctx.Request.URL.Query().Get(\"id\"))\n\tctx.RenderString(\"hello malatd\")\n}\n```\n\n### 参数绑定\n```\npackage main\n\nimport (\n\t\"github.com/swxctx/malatd/binding\"\n\n\ttd \"github.com/swxctx/malatd\"\n)\n\n/*\n\thttp://127.0.0.1:8080/malatd\n*/\nfunc main() {\n\t// new server\n\tsrv := td.NewServer(td.NewSrvConfig())\n\n\t// api router\n\tsrv.Get(\"/malatd1\", malatdApi1Handle)\n\tsrv.Post(\"/malatd2\", malatdApi2Handle)\n\tsrv.Run()\n}\n\ntype Args struct {\n\tA int    `query:\"a\" json:\"a\"`\n\tB string `query:\"b\" json:\"b\"`\n\tC string `json:\"c\"`\n}\n\ntype Result struct {\n\tA int    `json:\"a\"`\n\tB string `json:\"b\"`\n\tC string `json:\"c\"`\n}\n\nvar (\n\tbinder      = binding.JSON\n\tbinderQuery = binding.QUERY\n)\n\n// malatdApi1Handle\nfunc malatdApi1Handle(ctx *td.Context) {\n\t// bind params\n\tparams := new(Args)\n\terr := binderQuery.Bind(ctx, params)\n\tif err != nil {\n\t\tctx.RenderRerr(td.RerrInternalServer.SetReason(err.Error()))\n\t\treturn\n\t}\n\n\t// api逻辑调用\n\tresult, rerr := malatdApi1Logic(ctx, params)\n\tif rerr != nil {\n\t\tctx.RenderRerr(rerr)\n\t\treturn\n\t}\n\tctx.Render(result)\n}\n\n// malatdApi1Logic\nfunc malatdApi1Logic(ctx *td.Context, arg *Args)(*Result, *td.Rerror) {\n\txlog.Infof(\"Args-\u003e %v\", arg)\n\tresult := \u0026Result{\n\t\tA: arg.A,\n\t\tB: arg.B,\n\t\tC: arg.C,\n\t}\n\treturn result, nil\n}\n\n// malatdApi2Handle\nfunc malatdApi2Handle(ctx *td.Context) {\n\t// bind params\n\tparams := new(Args)\n\terr := binder.Bind(ctx, params)\n\tif err != nil {\n\t\tctx.RenderRerr(td.RerrInternalServer.SetReason(err.Error()))\n\t\treturn\n\t}\n\n\terr = binderQuery.Bind(ctx, params)\n\tif err != nil {\n\t\tctx.RenderRerr(td.RerrInternalServer.SetReason(err.Error()))\n\t\treturn\n\t}\n\n\t// api逻辑调用\n\tresult, rerr := malatdApi2Logic(ctx, params)\n\tif rerr != nil {\n\t\tctx.RenderRerr(rerr)\n\t\treturn\n\t}\n\tctx.Render(result)\n}\n\nfunc malatdApi2Logic(ctx *td.Context, arg *Args)(*Result, *td.Rerror) {\n\txlog.Infof(\"Args-\u003e %v\", arg)\n\tresult := \u0026Result{\n\t\tA: arg.A,\n\t\tB: arg.B,\n\t\tC: arg.C,\n\t}\n\treturn result, nil\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswxctx%2Fmalatd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswxctx%2Fmalatd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswxctx%2Fmalatd/lists"}