{"id":13719606,"url":"https://github.com/reiver/go-finger","last_synced_at":"2025-03-20T12:56:58.330Z","repository":{"id":63828422,"uuid":"567377052","full_name":"reiver/go-finger","owner":"reiver","description":"Pacakge finger implements the finger protocol, for the Go programming language.","archived":false,"fork":false,"pushed_at":"2024-04-21T04:19:55.000Z","size":127,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T09:43:22.790Z","etag":null,"topics":["finger","finger-protocol"],"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/reiver.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":"2022-11-17T16:56:04.000Z","updated_at":"2024-04-21T04:19:58.000Z","dependencies_parsed_at":"2024-01-12T22:18:19.342Z","dependency_job_id":"f02adc2e-c6d4-4123-b45a-92b392c60c89","html_url":"https://github.com/reiver/go-finger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-finger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-finger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-finger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-finger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiver","download_url":"https://codeload.github.com/reiver/go-finger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244618428,"owners_count":20482316,"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":["finger","finger-protocol"],"created_at":"2024-08-03T01:00:52.652Z","updated_at":"2025-03-20T12:56:58.302Z","avatar_url":"https://github.com/reiver.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-finger\n\nPackage **finger** implements the **finger-protocol**, for the Go programming language.\n\nI.e., generally, what is defined in:\n\n* IETF RFC-742 — https://datatracker.ietf.org/doc/html/rfc742\n* IETF RFC-1288 — https://datatracker.ietf.org/doc/html/rfc1288\n\nAlthough this package add some modernizations that are compatible with IETF RFC-742,\nand in the spirt of the **finger-protocol**,\n_that you can choose whether to use or not use_.\n\n## Documention\n\nOnline documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-finger\n\n[![GoDoc](https://godoc.org/github.com/reiver/go-finger?status.svg)](https://godoc.org/github.com/reiver/go-finger)\n\n## Simple Finger Client\n\nThis is an example of how to create very very very simple **finger-protocol** client using this package.\n\nIt is meant for educational purposes.\nA more useful **finger-protocol** client would include a lot more features.\nBut anyway....\n\nWe first need to decide what the **finger-protocol** target will be.\n\nWhat is a **finger-protocol** \"target\"‽\n\nWell, for example, if we were to run the **finger** program as:\n\n```\nfinger joeblow@example.com\n```\n\nThen out target would be:\n\n```go\n\"joeblow\"\n```\n\nSo, in our Go code we would have something like:\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\t//@TODO\n}\n```\n\nNow we need to put the `target` inside of a **finger-protocol** request.\n\nWe do that with the following code:\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\t//@TODO\n}\n```\n\nNext, we need to figure out what is the TCP-address of the **finger-protocol server** our **finger-protocol client** will connect to.\n\nTCP-addresses (as a string) look something like:\n\n\t\"example.com:79\"\n\n\t\"reiver.link:1971\"\n\n\t\"181.70.250.13:1079\"\n\n\t\"12.23.34.45:7979\"\n\nI.e., it is a 'host' and a TCP-port (with a colon \":\" between them).\n\nWe are using the following as our reference example:\n\n```\nfinger joeblow@example.com\n```\n\nSo what is our \"address\"‽\n\nIt cannot be just this:\n```go\n\"example.com\"\n```\n\nSince it doesn't include a TCP-port.\n\nBut, as it turns out, this package can handle this situation.\nWhen the TCP-port (in the address) is missing, it defaults it to the default **finger-protocol** TCP-port.\n(Which is TCP-port 79.)\n\nSo, now our code becomes:\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\tvar address finger.Address = finger.CreateAddressHost(\"example.com\")\n\n\t//@TODO\n}\n```\n\nNow we need to connect to the server.\nWe will do that using `net.Dial()`.\n\nSo....\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n\n\t\"fmt\"\n\t\"net\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\tvar address finger.Address = finger.CreateAddressHost(\"example.com\")\n\n\tconn, err := net.Dial(\"tcp\", address.Resolve())\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\tdefer conn.Close()\n\n\t//@TODO\n}\n```\n\nAnd now we need to create client that will use this TCP connection to make a **finger-protocol request**.\n\nSo, this will create the client:\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n\n\t\"fmt\"\n\t\"net\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\tvar address finger.Address = finger.CreateAddressHost(\"example.com\")\n\n\tconn, err := net.Dial(\"tcp\", address.Resolve())\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\tdefer conn.Close()\n\n\tvar client finger.Client = finger.AssembleClient(conn)\n\n\t//@TODO\n}\n```\n\nAnd then this will send the **finger-protocol request**.\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n\n\t\"fmt\"\n\t\"net\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\tvar address finger.Address = finger.CreateAddressHost(\"example.com\")\n\n\tconn, err := net.Dial(\"tcp\", address.Resolve())\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\tdefer conn.Close()\n\n\tvar client finger.Client = finger.AssembleClient(conn)\n\n\tresponseReader, err := client.Do(request)\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\n\t//@TODO\n}\n```\n\nAnd finally, this will send the **finger-protocol response** this program received from the **finger-protocol server** to STDOUT (so that we can see it):\n\n```go\npackage main\n\nimport (\n\t\"github.com/reiver/go-finger\"\n\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n)\n\nfunc main() {\n\n\tvar target finger.Target = finger.CreateTarget(\"joeblow\")\n\n\tvar request finger.Request = finger.AssembleRequestTarget(target)\n\n\tvar address finger.Address = finger.CreateAddressHost(\"example.com\")\n\n\tconn, err := net.Dial(\"tcp\", address.Resolve())\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\tdefer conn.Close()\n\n\tvar client finger.Client = finger.AssembleClient(conn)\n\n\tresponseReader, err := client.Do(request)\n\tif nil != err {\n\t\tfmt.Println(\"ERROR:\", err)\n\t\treturn\n\t}\n\n\tio.Copy(os.Stdout, responseReader)\n}\n```\n\n## Unicde UTF-8\n\n**This package supports Unicode UTF-8 text encoding for the finger-protocol.**\n\nThe finger-protocol existed **before** any IETF RFC was written about it, but —\n\nThere are 2 IETF RFCs that are relavent for the finger-protocol:\n\n* IETF RFC-742 (released in 1977) — https://datatracker.ietf.org/doc/html/rfc742\n* IETF RFC-1288 (released in 1991) — https://datatracker.ietf.org/doc/html/rfc1288\n\nIETF RFC-742 does _not_ directly or indirectly forbid the use of Unicode UTF-8 — because IETF RFC-742 does _not_ seem to explicitly specify what character-set should be used.\nIETF RFC-1288 indirectly forbids the use of Unicode UTF-8.\n\n**This package sides with the original IETF RFC-742, and supports Unicode UTF-8 text.**\n\nThis package does this (supports the Unicode UTF-8 encoding of text) to provide a _more modern_ implementation of the finger-protocol.\n\nSomeone in the future can write a new IETF RFC for the finger-protocol that gives permission to use the Unicode UTF-8 text encoding.\n\n## Import\n\nTo import package **finger** use import code like the follownig:\n\n```\nimport \"github.com/reiver/go-finger\"\n```\n\n## Installation\n\nTo install package **finger** do the following:\n\n```\nGOPROXY=direct go get https://github.com/reiver/go-finger\n```\n\n## Author\n\nPackage **finger** was written by [Charles Iliya Krempeaux](http://reiver.link/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiver%2Fgo-finger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiver%2Fgo-finger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiver%2Fgo-finger/lists"}