{"id":13412681,"url":"https://github.com/vanng822/go-premailer","last_synced_at":"2025-04-04T16:15:57.592Z","repository":{"id":27414235,"uuid":"30891222","full_name":"vanng822/go-premailer","owner":"vanng822","description":"Inline styling for html mail in golang","archived":false,"fork":false,"pushed_at":"2024-07-08T23:56:31.000Z","size":116,"stargazers_count":136,"open_issues_count":2,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-31T20:51:17.133Z","etag":null,"topics":["email","golang","html","inline-css","inline-styles","mail","premailer"],"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/vanng822.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}},"created_at":"2015-02-16T22:19:18.000Z","updated_at":"2024-07-22T01:16:10.000Z","dependencies_parsed_at":"2024-01-08T15:02:16.500Z","dependency_job_id":"edac5e87-6282-44df-8e92-35f16a0c9a01","html_url":"https://github.com/vanng822/go-premailer","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Fgo-premailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Fgo-premailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Fgo-premailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanng822%2Fgo-premailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanng822","download_url":"https://codeload.github.com/vanng822/go-premailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208178,"owners_count":20901570,"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":["email","golang","html","inline-css","inline-styles","mail","premailer"],"created_at":"2024-07-30T20:01:27.747Z","updated_at":"2025-04-04T16:15:57.568Z","avatar_url":"https://github.com/vanng822.png","language":"Go","funding_links":[],"categories":["Email","电子邮件","邮件库","邮件库`邮件管理和发送的go语言库`","Relational Databases"],"sub_categories":["Advanced Console UIs","检索及分析资料库","Search and Analytic Databases","SQL 查询语句构建库"],"readme":"# go-premailer\n\nInline styling for HTML mail in golang\n\n# Document\n[![GoDoc](https://godoc.org/github.com/vanng822/go-premailer/premailer?status.svg)](https://godoc.org/github.com/vanng822/go-premailer/premailer)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vanng822/go-premailer)](https://goreportcard.com/report/github.com/vanng822/go-premailer)\n\n# install\n\n\tgo get github.com/vanng822/go-premailer/premailer\n\n# Example\n\n\timport (\n\t\t\"fmt\"\n\t\t\"github.com/vanng822/go-premailer/premailer\"\n\t\t\"log\"\n\t)\n\n\tfunc main() {\n\t\tprem, err := premailer.NewPremailerFromFile(inputFile, premailer.NewOptions())\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\t\n\t\thtml, err := prem.Transform()\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\tfmt.Println(html)\n\t}\n\n## Input\n\n\t\u003chtml\u003e\n\t\u003chead\u003e\n\t\u003ctitle\u003eTitle\u003c/title\u003e\n\t\u003cstyle type=\"text/css\"\u003e\n\t\th1 { width: 300px; color:red; }\n\t\tstrong { text-decoration:none; }\n\t\u003c/style\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch1\u003eHi!\u003c/h1\u003e\n\t\t\u003cp\u003e\u003cstrong\u003eYes!\u003c/strong\u003e\u003c/p\u003e\n\t\u003c/body\u003e\n\t\u003c/html\u003e\n\n## Output\n\n\t\u003chtml\u003e\n\t\u003chead\u003e\n\t\u003ctitle\u003eTitle\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch1 style=\"color:red;width:300px\" width=\"300\"\u003eHi!\u003c/h1\u003e\n\t\t\u003cp\u003e\u003cstrong style=\"text-decoration:none\"\u003eYes!\u003c/strong\u003e\u003c/p\u003e\n\t\u003c/body\u003e\n\t\u003c/html\u003e\n\n\n\n# Commandline\n\n\t\u003e go run main.go -i your_email.html\n\t\u003e go run main.go -i your_mail.html -o process_mail.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanng822%2Fgo-premailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanng822%2Fgo-premailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanng822%2Fgo-premailer/lists"}