{"id":27224893,"url":"https://github.com/presmihaylov/decks","last_synced_at":"2025-08-03T13:09:09.145Z","repository":{"id":57486862,"uuid":"200178377","full_name":"presmihaylov/decks","owner":"presmihaylov","description":"A golang package for creating decks of cards","archived":false,"fork":false,"pushed_at":"2019-08-02T08:08:28.000Z","size":20,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T12:43:57.741Z","etag":null,"topics":["deckofcards","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/presmihaylov.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}},"created_at":"2019-08-02T06:28:06.000Z","updated_at":"2024-10-18T20:23:36.000Z","dependencies_parsed_at":"2022-09-01T22:51:20.999Z","dependency_job_id":null,"html_url":"https://github.com/presmihaylov/decks","commit_stats":null,"previous_names":["presmihaylov/decks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/presmihaylov%2Fdecks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/presmihaylov%2Fdecks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/presmihaylov%2Fdecks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/presmihaylov%2Fdecks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/presmihaylov","download_url":"https://codeload.github.com/presmihaylov/decks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248200997,"owners_count":21064013,"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":["deckofcards","go","golang"],"created_at":"2025-04-10T10:45:19.096Z","updated_at":"2025-04-10T10:45:19.710Z","avatar_url":"https://github.com/presmihaylov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decks\n\nPackage decks provides a simple API for creating and customizing decks of cards in Go.\n\n## Installation\n```\ngo get github.com/preslavmihaylov/decks\n```\n\n## Quickstart\n```go\n// get a default, ordered deck of 52 cards\nd, err := decks.New()\nif err != nil {\n  // handle error\n}\n\n// Make sure you specify a random seed before shuffling the deck\nrand.Seed(time.Now().UnixNano())\t\n\n// Shuffle deck of cards\nd.Shuffle()\n\n// draw cards\nmyHand := []decks.Card{}\nmyHand = append(myHand, d.Draw())\nmyHand = append(myHand, d.Draw())\n\n// print hand\nfor _, c := range myHand {\n  fmt.Println(c)\n}\n\n// discard hand\nd.InsertBottom(myHand)\n```\n[Try it on The Go Playground](https://play.golang.org/p/Jw9jvqQhtKc)\n\nCheck out the [full documentation](https://godoc.org/github.com/preslavmihaylov/decks)\n## Contributing\nPull requests and feature requests are welcome. Feel free to submit a new issue and/or a PR.  \nMake sure your Pull Request is well documented and reasoned.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpresmihaylov%2Fdecks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpresmihaylov%2Fdecks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpresmihaylov%2Fdecks/lists"}