{"id":22540605,"url":"https://github.com/dolmen-go/endian","last_synced_at":"2025-04-09T21:45:16.019Z","repository":{"id":57488220,"uuid":"72831001","full_name":"dolmen-go/endian","owner":"dolmen-go","description":"Gives endianness of the GOARCH","archived":false,"fork":false,"pushed_at":"2025-03-05T09:41:37.000Z","size":85,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:36:13.300Z","etag":null,"topics":["byte-order","endianness","goarch","golang","golang-module","golang-package"],"latest_commit_sha":null,"homepage":null,"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/dolmen-go.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":"2016-11-04T09:00:55.000Z","updated_at":"2025-03-04T14:55:35.000Z","dependencies_parsed_at":"2024-08-26T18:57:49.882Z","dependency_job_id":"afb1c127-1111-423e-bfc2-fbf9bad73b5b","html_url":"https://github.com/dolmen-go/endian","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fendian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fendian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fendian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmen-go%2Fendian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dolmen-go","download_url":"https://codeload.github.com/dolmen-go/endian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119439,"owners_count":21050754,"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":["byte-order","endianness","goarch","golang","golang-module","golang-package"],"created_at":"2024-12-07T12:11:39.658Z","updated_at":"2025-04-09T21:45:16.011Z","avatar_url":"https://github.com/dolmen-go.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# endian.Native - A single constant that you should not use\n\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/dolmen-go/endian)\n[![Codecov](https://codecov.io/gh/dolmen-go/endian/graph/badge.svg?token=AUuPGQ01UE)](https://codecov.io/gh/dolmen-go/endian)[![Go Report Card](https://goreportcard.com/badge/github.com/dolmen-go/endian)](https://goreportcard.com/report/github.com/dolmen-go/endian)\n\n## WARNING 1\n\nYou should probably not use this package, because you should avoid using the native byte ordering in programs!\n\nRead this article by Rob Pike before using this package:\n\nhttps://commandcenter.blogspot.fr/2012/04/byte-order-fallacy.html\n\nYou should probably first try to fix the broken code that generates\ndata dependent on the architecture on which it is compiled. Fix it so it\nalways generates code using a fixed byte order.\nIf you can't, see if you can detect the byte order of the data from the\ndata itself.\n\n\n## WARNING 2\n\nGo 1.21 has added [NativeEndian](https://pkg.go.dev/encoding/binary#NativeEndian)\n(see proposal [#57237](https://go.dev/issue/57237)) which serves the same purpose.\n\nThis package is compatible even with very old versions of Go.\n\n## Usage\n\nThis package only exports a single variable containing the [byte order](https://pkg.go.dev/encoding/binary#ByteOrder) of\nGOARCH.\n\nSee the [encoding/binary](https://pkg.go.dev/encoding/binary) package\nfor how to use it to read/write a binary data stream.\n\n```go\npackage endian\n\nimport \"encoding/binary\"\n\nvar Native binary.ByteOrder\n```\n\nThe implementation is ultra lightweight because it relies on build tags.\n\n## License\n\nCopyright 2016-2025 Olivier Mengué\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmen-go%2Fendian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolmen-go%2Fendian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmen-go%2Fendian/lists"}