{"id":29653909,"url":"https://github.com/eneskzlcn/morsencoder","last_synced_at":"2026-04-15T23:31:11.300Z","repository":{"id":61626228,"uuid":"443983195","full_name":"eneskzlcn/morsencoder","owner":"eneskzlcn","description":"morsencoder is an api that listens for any request to the endpoint \"/encode\" with a query parameter text like \"/encode?text=text to morse code encode\", encodes that text and returns it back to the client as string.","archived":false,"fork":false,"pushed_at":"2022-09-28T10:21:30.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T07:28:26.006Z","etag":null,"topics":["api-server","docker-image","dockerci","go-fiber","golang","golangci","golangci-lint","http-testing","morse-code-translator","test-driven-development","unit-testing"],"latest_commit_sha":null,"homepage":"","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/eneskzlcn.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}},"created_at":"2022-01-03T08:01:23.000Z","updated_at":"2023-10-24T04:15:32.000Z","dependencies_parsed_at":"2022-10-19T23:30:50.556Z","dependency_job_id":null,"html_url":"https://github.com/eneskzlcn/morsencoder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/eneskzlcn/morsencoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneskzlcn%2Fmorsencoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneskzlcn%2Fmorsencoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneskzlcn%2Fmorsencoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneskzlcn%2Fmorsencoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eneskzlcn","download_url":"https://codeload.github.com/eneskzlcn/morsencoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneskzlcn%2Fmorsencoder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: 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":["api-server","docker-image","dockerci","go-fiber","golang","golangci","golangci-lint","http-testing","morse-code-translator","test-driven-development","unit-testing"],"created_at":"2025-07-22T07:01:42.052Z","updated_at":"2026-04-15T23:31:11.290Z","avatar_url":"https://github.com/eneskzlcn.png","language":"Go","readme":"## morsencoder\n\n### About Project \n\nmorsencoder is an api that listens for any request\nto the endpoint \"/encode\" with a query parameter text\nlike \"/encode?text=text to morse code encode\", encodes\nthat text and returns it back to the client as string.\n\n## Letter Separation\nmorsencoder uses letter separator as one whitespace. Each\nletter encoded to morse code will be seperated by one whitespace.\n\nEx: given text \"ab\" will be encoded as `.- -...` where `.-` is\nthe `a` letter and `-...` is the `b` letter in morse code alphabet.\n\n## Word Separation\n\nmorsencoder uses letter separator as one backslash between two whitespaces(' / '). Each\nword encoded to morse code will be seperated by one backslash between two whitespaces(' / ').\n\nEx: given text `aa bb` will be encoded as `.- .- / -... -...`\nwhere `.-` is the `a` letter and `-...` is the `b` letter and ` ` is the letter separator in morse code alphabet.\n\n### How To Build\n\nYou can directly use the make command written for build \n```shell\nmake build\n```\nto build the application.\n\nFor docker builds, you can use \n```shell\nmake dockerize\n```\nto build the image with the name eneskzlcn/morsencoder and \nwith tag \"latest\". If you build with another name and tag \nyou can configure the `dockerize` command in Makefile or you \ncan directly execute the following command:\n\n```shell\ndocker build -t \u003cimage-name\u003e:\u003cimage-tag\u003e .\n```\n\n### How To Test\n\nBefore you execute the tests, you need to execute the command \n```shell\nmake generate-mocks\n```\nto generate all necessary mocks for tests.\n\nAfter mocks generated, you can simply execute \n```shell\nmake unit-tests\n``` \nto\nrun all unit tests, or you can use following command:\n```shell\ngo test -v ./...\n``` \nfor run all tests or \n```shell\ngo test -v .internal/...\n``` \nto just run domain tests.\n\n### How To Run\nIf you have `go 1.18` installed on your machine, you can simply\nbuild the application with command \n```shell\ngo build -o bin/morsencoder .cmd/morsencoder\n``` \nand then run \n```shell\n./bin/morsencoder\n```\nor\n```shell\ngo run ./cmd/morsencoder/main.go\n```\n\nIf you have docker installed on your machine, you can also run\napplication as docker container with the following commands\n```shell\ndocker build -t \u003cimage-name\u003e:\u003cimage-tag\u003e .\n```\nto build docker image, and \n```shell\ndocker run -p \u003chost-port\u003e:4200 \u003cimage-name\u003e:\u003cimage-tag\u003e\n```\nto run docker image as docker container.\n### Run Linter\nI use `golangci-lint` default linter. If you have\n`golangci-lint` installed on your machine, you can\nsimply use \n```shell\ngolangci-lint run\n```\nto run linters.\n\n### Test Coverage\nI use GoLand IDE which provides me to test coverage of my code.\n\nIf you use GoLand IDE you can simply go to the `./internal/morsencoder`\nand right click on `morsencoder_test` package. Then select `Run with Coverage` from menu which\nbrings you a coverage report that contains your coverage as percentage on chosen package (morsencoder).\n\nI have 100% coverage on the domain files `./internal/morsencoder`\n\n### Letter Morse Code Key Map\n```\n'A': \".-\"\n\n'B': \"-...\"\n\n'C': \"-.-.\"\n\n'D': \"-..\"\n\n'E': \".\"\n\n'F': \"..-.\"\n\n'G': \"--.\"\n\n'H': \"....\"\n\n'I': \"..\"\n\n'J': \".---\"\n\n'K': \"-.-\"\n\n'L': \".-..\"\n\n'M': \"--\"\n\n'N': \"-.\"\n\n'O': \"---\"\n\n'P': \".--.\"\n\n'Q': \"--.-\"\n\n'R': \".-.\"\n\n'S': \"...\"\n\n'T': \"-\"\n\n'U': \"..-\"\n\n'V': \"...-\"\n\n'W': \".--\"\n\n'X': \"-..-\"\n\n'Y': \"-.--\"\n\n'Z': \"--..\"\n\n'1': \".----\"\n\n'2': \"..---\"\n\n'3': \"...--\"\n\n'4': \"....-\"\n\n'5': \".....\"\n\n'6': \"-....\"\n\n'7': \"--...\"\n\n'8': \"---..\"\n\n'9': \"----.\"\n\n'0': \"-----\"\n\n'.': \".-.-.-\"\n\n',': \"--..--\"\n\n'?': \"..--..\"\n\n'!': \"-.-.--\"\n\n'-': \"-....-\"\n\n'/': \"-..-.\"\n\n'@': \".--.-.\"\n\n'(': \"-.--.\"\n\n')': \"-.--.-\"\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskzlcn%2Fmorsencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feneskzlcn%2Fmorsencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskzlcn%2Fmorsencoder/lists"}