{"id":16308977,"url":"https://github.com/bayashi/go-edge","last_synced_at":"2025-09-08T19:35:00.076Z","repository":{"id":120111255,"uuid":"610039860","full_name":"bayashi/go-edge","owner":"bayashi","description":"`go-edge` provides the command `edge` to show the edge of logs with conditional grep","archived":false,"fork":false,"pushed_at":"2023-04-28T07:51:37.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T03:16:27.357Z","etag":null,"topics":["cli","golang","head","log","tail"],"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/bayashi.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":"2023-03-06T00:30:59.000Z","updated_at":"2023-04-21T14:57:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8e9dc8f-82c6-4d6b-9204-77d3a931908a","html_url":"https://github.com/bayashi/go-edge","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayashi%2Fgo-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayashi%2Fgo-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayashi%2Fgo-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayashi%2Fgo-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayashi","download_url":"https://codeload.github.com/bayashi/go-edge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657919,"owners_count":21140846,"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":["cli","golang","head","log","tail"],"created_at":"2024-10-10T21:19:20.173Z","updated_at":"2025-04-13T03:16:30.800Z","avatar_url":"https://github.com/bayashi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-edge\n\n`go-edge` provides the command `edge` to show the edge of logs with conditional grep\n\n## Usage\n\n    $ edge [options] FILE\n\n## Options\n\n    -g   --grep  KEYWORD  grep condition\n    -c                    also show the total line count\n\n## Examples\n\nHere is the 'error.log' file.\n\n    $ cat error.log\n    2023/02/27 08:43:00,not found\n    2023/02/27 08:43:01,not found\n    2023/02/27 08:43:02,not found\n    2023/02/27 08:43:03,no auth\n\nThen you execute the `edge` command. Then shown the first line and last line.\n\n    $ edge error.log\n    1: 2023/02/27 08:43:00,not found\n    4: 2023/02/27 08:43:03,no auth\n\nThe number of top of line is line number of the file.\n\nAnd you can use `-c` option to know total line number.\n\n    $ edge -c error.log\n    1: 2023/02/27 08:43:00,not found\n    4: 2023/02/27 08:43:03,no auth\n    total 4 lines\n\nThe above is pretty much the same as below command executions:\n\n    $ cat error.log | head -n1\n    $ cat error.log | tail -n1\n    $ cat error.log | wc -l\n\nWith `--grep` option, you can get filtered 1st line and last line.\n\n    $ edge --grep found error.log\n    1: 2023/02/27 08:43:00,not found\n    3: 2023/02/27 08:43:02,not found\n\nWith `--grep` and `-c` option:\n\n    $ edge -c --grep found error.log\n    1: 2023/02/27 08:43:00,not found\n    3: 2023/02/27 08:43:02,not found\n    total 4 lines\n\n## Installation\n\n    go install github.com/bayashi/go-edge/cmd/edge@latest\n\n## License\n\nApache License 2.0\n\n## Author\n\nDai Okabayashi: @bayashi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayashi%2Fgo-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayashi%2Fgo-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayashi%2Fgo-edge/lists"}