{"id":18727966,"url":"https://github.com/yuzutech/kroki-go","last_synced_at":"2025-04-12T16:32:47.988Z","repository":{"id":41469387,"uuid":"170372225","full_name":"yuzutech/kroki-go","owner":"yuzutech","description":"Kroki Go library","archived":false,"fork":false,"pushed_at":"2024-03-23T15:32:13.000Z","size":56,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T19:25:25.715Z","etag":null,"topics":["api","diagrams","go","golang","images","kroki","library"],"latest_commit_sha":null,"homepage":null,"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/yuzutech.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":"2019-02-12T18:49:01.000Z","updated_at":"2024-03-23T23:49:13.000Z","dependencies_parsed_at":"2023-01-25T11:46:01.446Z","dependency_job_id":"17b050ed-7d4f-4897-93e1-c3869058511a","html_url":"https://github.com/yuzutech/kroki-go","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuzutech","download_url":"https://codeload.github.com/yuzutech/kroki-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223528208,"owners_count":17160173,"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":["api","diagrams","go","golang","images","kroki","library"],"created_at":"2024-11-07T14:19:24.464Z","updated_at":"2024-11-07T14:19:26.048Z","avatar_url":"https://github.com/yuzutech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kroki Go\n\n[![Build Status](https://github.com/yuzutech/kroki-go/workflows/CI/badge.svg)](https://github.com/yuzutech/kroki-go/actions?query=workflow%3ACI)\n\nA Golang library for [https://kroki.io/](https://kroki.io/).\n\n## Usage\n\nCreate a client:\n\n```golang\nclient := kroki.New(kroki.Configuration{\n\t\tURL:     \"https://kroki.io\",\n\t\tTimeout: time.Second * 20,\n\t})\n```\n\n### String to diagram\n\nUse the `FromString` function to convert a string to a diagram:\n\n```golang\nresult, err := client.FromString(\"digraph G {Hello-\u003eWorld}\", kroki.GraphViz, kroki.SVG)\n```\n\nHere, `result` contains the image returned by Kroki as a string.\n\n### File to diagram\n\nUse the `FromFile` function to convert a file to a diagram:\n\n```bash\necho \"digraph G {Hello-\u003eWorld}\" \u003e hello.dot\n```\n\n```golang\nresult, err := client.FromFile(\"./hello.dot\", kroki.GraphViz, kroki.SVG)\n```\n\n### Write to a file\n\nUse the `WriteToFile` function to write a result to a file:\n\n```golang\nerr = client.WriteToFile(\"./result.svg\", result)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzutech%2Fkroki-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuzutech%2Fkroki-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzutech%2Fkroki-go/lists"}