diff --git a/.gitignore b/.gitignore index 5cc2bc0..0244da2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /*/.flox/cache /*/.flox/log /*/.flox/run +go/hello diff --git a/README.md b/README.md index 2e066b6..9835110 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ | :--- | :-----: | :----: | :-----: | :---------- | | | | **Languages:** | +| `go` | ✅ | ✅ | ✅ | | | `python-poetry` | ✅ | ✅ | ✅ | Python environment using poerty | | `ruby` | ✅ | ✅ | ✅ | Ruby environment | | `rust` | ✅ | ✅ | ✅ | Rust environment | diff --git a/go/.flox/.gitignore b/go/.flox/.gitignore new file mode 100644 index 0000000..15d71a1 --- /dev/null +++ b/go/.flox/.gitignore @@ -0,0 +1,4 @@ +run/ +cache/ +lib/ +log/ diff --git a/go/.flox/env.json b/go/.flox/env.json new file mode 100644 index 0000000..a6c2ee4 --- /dev/null +++ b/go/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "go", + "version": 1 +} \ No newline at end of file diff --git a/go/.flox/env/manifest.lock b/go/.flox/env/manifest.lock new file mode 100644 index 0000000..0a30bbd --- /dev/null +++ b/go/.flox/env/manifest.lock @@ -0,0 +1,863 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "go": { + "pkg-path": "go", + "version": ">=1.23" + }, + "go-task": { + "pkg-path": "go-task" + }, + "gomodifytags": { + "pkg-path": "gomodifytags" + }, + "gopls": { + "pkg-path": "gopls" + }, + "gore": { + "pkg-path": "gore" + }, + "gotests": { + "pkg-path": "gotests" + }, + "gotools": { + "pkg-path": "gotools" + } + }, + "vars": {}, + "hook": { + "on-activate": "# Point GOENV to Flox environment cache\nexport GOENV=\"${FLOX_ENV_CACHE}/go\"\n" + }, + "profile": {}, + "options": { + "systems": [ + "aarch64-darwin", + "aarch64-linux", + "x86_64-darwin", + "x86_64-linux" + ], + "allow": { + "licenses": [] + }, + "semver": {} + }, + "services": {}, + "build": {} + }, + "packages": [ + { + "attr_path": "go", + "broken": false, + "derivation": "/nix/store/bcc5mmdyknixsyjls6ssa39jpvxfdh7y-go-1.23.2.drv", + "description": "Go Programming language", + "install_id": "go", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-1.23.2", + "pname": "go", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.23.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/35jikx2wg5r0qj47sic0p99bqnmwi6cn-go-1.23.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go", + "broken": false, + "derivation": "/nix/store/9lg8g2639ziz0s0fph98ayprqk1np57r-go-1.23.2.drv", + "description": "Go Programming language", + "install_id": "go", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-1.23.2", + "pname": "go", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.23.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6bx6d90kpy537yab22wja70ibpp4gkww-go-1.23.2" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go", + "broken": false, + "derivation": "/nix/store/jv9m0ar13nfwv2pkq6y9kq7z51li8r0j-go-1.23.2.drv", + "description": "Go Programming language", + "install_id": "go", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-1.23.2", + "pname": "go", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.23.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yi89mimkmw48qhzrll1aaibxbvllpsjv-go-1.23.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go", + "broken": false, + "derivation": "/nix/store/nr997ailf3xzchn3mj7awf1xf9yd3h53-go-1.23.2.drv", + "description": "Go Programming language", + "install_id": "go", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-1.23.2", + "pname": "go", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.23.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/klw1ipjsqx1np7pkk833x7sad7f3ivv9-go-1.23.2" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go-task", + "broken": false, + "derivation": "/nix/store/xvz4cvcfbc5zway4q3m73cd4dgkd3vcm-go-task-3.39.2.drv", + "description": "Task runner / simpler Make alternative written in Go", + "install_id": "go-task", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-task-3.39.2", + "pname": "go-task", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.39.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/aqcr7jv0m2s8nz481ay310i0dh4mbj48-go-task-3.39.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go-task", + "broken": false, + "derivation": "/nix/store/x61dr72ghw091ahjsi9qa2girhwravwi-go-task-3.39.2.drv", + "description": "Task runner / simpler Make alternative written in Go", + "install_id": "go-task", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-task-3.39.2", + "pname": "go-task", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.39.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/08haalp24y68v0krddls5c18hcl6n80p-go-task-3.39.2" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go-task", + "broken": false, + "derivation": "/nix/store/9nqxgmsk1lv9350xw13gr67vracjpqdz-go-task-3.39.2.drv", + "description": "Task runner / simpler Make alternative written in Go", + "install_id": "go-task", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-task-3.39.2", + "pname": "go-task", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.39.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/n6qmzm7h0vdj87qz3bfay17cfrhm3bki-go-task-3.39.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "go-task", + "broken": false, + "derivation": "/nix/store/xgwhcpvmvar53yy4yaacijwyhncwnrkp-go-task-3.39.2.drv", + "description": "Task runner / simpler Make alternative written in Go", + "install_id": "go-task", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "go-task-3.39.2", + "pname": "go-task", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.39.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/sxlbgmc56mkv64rn772rczpin8vjn6lp-go-task-3.39.2" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gomodifytags", + "broken": false, + "derivation": "/nix/store/vjzpsgbazrafjm7142n38gwmsa6k9xn0-gomodifytags-1.17.0.drv", + "description": "Go tool to modify struct field tags", + "install_id": "gomodifytags", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gomodifytags-1.17.0", + "pname": "gomodifytags", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.17.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/mnswkflwl7vrjmzjsx7r85agxzphfhfd-gomodifytags-1.17.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gomodifytags", + "broken": false, + "derivation": "/nix/store/jj1dn8qjkgi5j2325iyqhvkid1v4v9jw-gomodifytags-1.17.0.drv", + "description": "Go tool to modify struct field tags", + "install_id": "gomodifytags", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gomodifytags-1.17.0", + "pname": "gomodifytags", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.17.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2483kz0ahg3p99s9jjkcfsi00c5z6m6q-gomodifytags-1.17.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gomodifytags", + "broken": false, + "derivation": "/nix/store/njh434d2iscwak67w6dmsvcbwljdcxqw-gomodifytags-1.17.0.drv", + "description": "Go tool to modify struct field tags", + "install_id": "gomodifytags", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gomodifytags-1.17.0", + "pname": "gomodifytags", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.17.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/xfs3rkl9yn4dv11znfcjwzs5ydny3ady-gomodifytags-1.17.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gomodifytags", + "broken": false, + "derivation": "/nix/store/79i4wka992la4fm9q54hvbv47i8z12gc-gomodifytags-1.17.0.drv", + "description": "Go tool to modify struct field tags", + "install_id": "gomodifytags", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gomodifytags-1.17.0", + "pname": "gomodifytags", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.17.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/ppj1bqh3zrcfi9izx75mz69ijh60g51j-gomodifytags-1.17.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gopls", + "broken": false, + "derivation": "/nix/store/65s3z4v0pmsrhjiwbngmv6ymawshzy5f-gopls-0.16.2.drv", + "description": "Official language server for the Go language", + "install_id": "gopls", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gopls-0.16.2", + "pname": "gopls", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2q2hry68jh2yvalxgr8qpmaddipn7r60-gopls-0.16.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gopls", + "broken": false, + "derivation": "/nix/store/gcvd7pzci7v0xdyhy9y3mhpfm5yysgwb-gopls-0.16.2.drv", + "description": "Official language server for the Go language", + "install_id": "gopls", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gopls-0.16.2", + "pname": "gopls", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/z504iqx3pdd37r0r1ha6qrab6xnx3sh1-gopls-0.16.2" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gopls", + "broken": false, + "derivation": "/nix/store/yg8b2lb3by3gg2mzkr6f6q3klpm30qsr-gopls-0.16.2.drv", + "description": "Official language server for the Go language", + "install_id": "gopls", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gopls-0.16.2", + "pname": "gopls", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/z19kn6nry3rdn7hnhyn6mfg0y6bx9z5i-gopls-0.16.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gopls", + "broken": false, + "derivation": "/nix/store/np7ii2l8rj6hksmzhpyj9a8gf7pk5glj-gopls-0.16.2.drv", + "description": "Official language server for the Go language", + "install_id": "gopls", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gopls-0.16.2", + "pname": "gopls", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/msh7zw05fn4jdz5lpnqnz38c4kfp5qgr-gopls-0.16.2" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gore", + "broken": false, + "derivation": "/nix/store/8javisydq63bi2j05qpbzdzxwvabpjrc-gore-0.5.7.drv", + "description": "Yet another Go REPL that works nicely", + "install_id": "gore", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gore-0.5.7", + "pname": "gore", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.5.7", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/swgmysqqqa6hh9smbkyjgryknyriw5ps-gore-0.5.7" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gore", + "broken": false, + "derivation": "/nix/store/xxdcj488lqb52arhb60yfmqkr7jycmq7-gore-0.5.7.drv", + "description": "Yet another Go REPL that works nicely", + "install_id": "gore", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gore-0.5.7", + "pname": "gore", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.5.7", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/ila5r84y2dnrw6c7iiy5qvyn4m3i55f1-gore-0.5.7" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gore", + "broken": false, + "derivation": "/nix/store/c6n9vfva018pm51n1s87vrhlj482d13a-gore-0.5.7.drv", + "description": "Yet another Go REPL that works nicely", + "install_id": "gore", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gore-0.5.7", + "pname": "gore", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.5.7", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/65vcbn36ylx31ipy97fy8fmx1pszaki4-gore-0.5.7" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gore", + "broken": false, + "derivation": "/nix/store/3zk05vssqn2yrrm0xfp8qh3qmyjb0x6v-gore-0.5.7.drv", + "description": "Yet another Go REPL that works nicely", + "install_id": "gore", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gore-0.5.7", + "pname": "gore", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.5.7", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/06cbhr827q553gj2z1xlyw0v1bs2xmh3-gore-0.5.7" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotests", + "broken": false, + "derivation": "/nix/store/xnxm7bprkiw6594ny2si35pp5q0v444j-gotests-1.6.0.drv", + "description": "Generate Go tests from your source code", + "install_id": "gotests", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotests-1.6.0", + "pname": "gotests", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.6.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/drfxizd0pgxga30j49bskgpr4vv1fm2a-gotests-1.6.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotests", + "broken": false, + "derivation": "/nix/store/irbp3jq9y0f5kjxvxvwq1xg8jmd04vhx-gotests-1.6.0.drv", + "description": "Generate Go tests from your source code", + "install_id": "gotests", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotests-1.6.0", + "pname": "gotests", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.6.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/h317y6bhr77pwqymvyji2fb5z8kbxhw1-gotests-1.6.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotests", + "broken": false, + "derivation": "/nix/store/phjwj5xd99ff14dqv245v9sb6v9nf0iy-gotests-1.6.0.drv", + "description": "Generate Go tests from your source code", + "install_id": "gotests", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotests-1.6.0", + "pname": "gotests", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.6.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/wm1cf68zfki0nhsswya46q14lqadp2y4-gotests-1.6.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotests", + "broken": false, + "derivation": "/nix/store/lczv0bqgs9v14hzdln3k2436ssswp4hd-gotests-1.6.0.drv", + "description": "Generate Go tests from your source code", + "install_id": "gotests", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotests-1.6.0", + "pname": "gotests", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.6.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/zgrx9crb9zyv6x5afsgqmhzc1g2yq2xl-gotests-1.6.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotools", + "broken": false, + "derivation": "/nix/store/k1dm0syhmkm25pzgdkkafxk6bp1skpln-gotools-0.25.0.drv", + "description": "Additional tools for Go development", + "install_id": "gotools", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotools-0.25.0", + "pname": "gotools", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.25.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/gqbbcvni4my9686x7dz454ysw8iscn3f-gotools-0.25.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotools", + "broken": false, + "derivation": "/nix/store/fg17x8xyzz0vxl31hk7dkbkhh44859d3-gotools-0.25.0.drv", + "description": "Additional tools for Go development", + "install_id": "gotools", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotools-0.25.0", + "pname": "gotools", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.25.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/j833fa6mnc0aghkhaykfhjdj4hr3wxgc-gotools-0.25.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotools", + "broken": false, + "derivation": "/nix/store/xllkg87xhh5my10526q1zdq0z8yy6l7s-gotools-0.25.0.drv", + "description": "Additional tools for Go development", + "install_id": "gotools", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotools-0.25.0", + "pname": "gotools", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.25.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/ii7389mh99pbq1mp6i36p50xdz7mm6hc-gotools-0.25.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gotools", + "broken": false, + "derivation": "/nix/store/mb5rwlc57b4jypdyiv51yywdwdwv20jd-gotools-0.25.0.drv", + "description": "Additional tools for Go development", + "install_id": "gotools", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=18536bf04cd71abd345f9579158841376fdd0c5a", + "name": "gotools-0.25.0", + "pname": "gotools", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev_count": 696981, + "rev_date": "2024-10-25T18:19:15Z", + "scrape_date": "2024-10-28T04:00:37Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "0.25.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4fqhx1yk5dhph45c1b7xxyy2kgf8rxjl-gotools-0.25.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ] +} \ No newline at end of file diff --git a/go/.flox/env/manifest.toml b/go/.flox/env/manifest.toml new file mode 100644 index 0000000..03cf12b --- /dev/null +++ b/go/.flox/env/manifest.toml @@ -0,0 +1,29 @@ +version = 1 + +[install] +go.pkg-path = "go" +go.version = ">=1.23" + +# Taskfile support. +go-task.pkg-path = "go-task" + +# Common editor dependencies. +gomodifytags.pkg-path = "gomodifytags" +gopls.pkg-path = "gopls" +gore.pkg-path = "gore" +gotests.pkg-path = "gotests" +gotools.pkg-path = "gotools" + +[hook] +on-activate = ''' +# Point GOENV to Flox environment cache +export GOENV="${FLOX_ENV_CACHE}/go" +''' + +[options] +systems = [ + "aarch64-darwin", + "aarch64-linux", + "x86_64-darwin", + "x86_64-linux", +] diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 0000000..50c3087 --- /dev/null +++ b/go/go.mod @@ -0,0 +1,9 @@ +module example.com/hello + +go 1.23.2 + +require ( + golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c // indirect + rsc.io/quote v1.5.2 // indirect + rsc.io/sampler v1.3.0 // indirect +) diff --git a/go/go.sum b/go/go.sum new file mode 100644 index 0000000..4a8bcd7 --- /dev/null +++ b/go/go.sum @@ -0,0 +1,6 @@ +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= +rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go/main.go b/go/main.go new file mode 100644 index 0000000..184ee5c --- /dev/null +++ b/go/main.go @@ -0,0 +1,10 @@ +package main + +import ( + "fmt" + "rsc.io/quote" +) + +func main() { + fmt.Println(quote.Hello()) +} diff --git a/go/test.sh b/go/test.sh new file mode 100755 index 0000000..e1c457f --- /dev/null +++ b/go/test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -eo pipefail + +check_command() { + if ! command -v $1 2>&1 >/dev/null; then + echo "Error: '$1' command could not be found." + exit 1 + fi +} + +check_command go + +go build +echo ">>> go build works" + +./hello +echo ">>> go binary works"