gomodinit @main -
refs -
log -
-
https://git.jolheiser.com/gomodinit.git
go mod init
fix: clean override
Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY
oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQNwnIejXSTnEFcTiRnuOfiGgJe7TwDROTRG0PwSRAVwQJVNuRXHTZPoHwsJpgKxrhj
/nBhwkFCgQsC18dWmUJAU=
-----END SSH SIGNATURE-----
3 changed files, 41 additions(+), 32 deletions(-)
diff --git a/flake.lock b/flake.lock
index e8408a257429bfbc70205e5e649685f7138b5a0b..f69c4ce8c437e1c377e1ac4af99687caa81752ec 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,15 +2,16 @@ {
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1703206931,
+ "lastModified": 1733935885,
- "narHash": "sha256-GHJl3HHdH4jWjRVBuyDRIaUoNNMTuVbw0i9+EaYzcBU=",
+ "narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bfbfb344598544058481e254b9f0f174d05b5e6a",
+ "rev": "5a48e3c2e435e95103d56590188cfed7b70e108c",
"type": "github"
},
"original": {
"owner": "nixos",
+ "ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
diff --git a/flake.nix b/flake.nix
index a7c7508c716fabe261ce3c719c7ad302630a45c4..00d45c1c0cb539f6ab368926d62f338b26f0022e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,60 +1,67 @@
{
description = "go mod init";
- inputs.nixpkgs.url = "github:nixos/nixpkgs";
+ outputs = {
- outputs = {
+
self,
+
nixpkgs,
+
}: let
+
system = "x86_64-linux";
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
{
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
description = "go mod init";
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
inputs.nixpkgs.url = "github:nixos/nixpkgs";
-{
+ {
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
outputs = {
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
self,
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
nixpkgs,
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
}: let
-{
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
system = "x86_64-linux";
- description = "go mod init";
+ outputs = {
- description = "go mod init";
+ outputs = {
{
-
- description = "go mod init";
+ outputs = {
description = "go mod init";
- description = "go mod init";
+ outputs = {
- description = "go mod init";
+ outputs = {
inputs.nixpkgs.url = "github:nixos/nixpkgs";
- description = "go mod init";
+
+ outputs = {
outputs = {
- description = "go mod init";
+ outputs = {
self,
- description = "go mod init";
+ outputs = {
nixpkgs,
- description = "go mod init";
+ outputs = {
}: let
-
- description = "go mod init";
+ outputs = {
system = "x86_64-linux";
-
+ self,
+ };
+ self,
{
-
+ self,
description = "go mod init";
+ go
+ gopls
+ ];
description = "go mod init";
-{
+ nixpkgs,
};
- };
}
diff --git a/main.go b/main.go
index 6b688ad153d627b197eff14fb1c5d6ebb9f4cd5a..7d390454567c4aff67019aa85f5ccf8fd53d5b28 100644
--- a/main.go
+++ b/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "bytes"
"errors"
"flag"
"fmt"
@@ -74,5 +75,5 @@
parts := strings.SplitN(name, "/", 2)
"flag"
- "io/fs"
+ "os/exec"
}