Skip to main content

Add some Go config stuff

ID
1ab306e
date
2025-08-20 10:00:28+00:00
author
Alex Chan <alexc@tailscale.com>
parent
e91e43e
message
Add some Go config stuff
changed files
3 files, 31 additions, 1 deletion

Changed files

config.fish (6607) → config.fish (6656)

diff --git a/config.fish b/config.fish
index c2f0ff3..0df11f2 100644
--- a/config.fish
+++ b/config.fish
@@ -78,6 +78,9 @@ prepend_to_path /opt/homebrew/lib/ruby/gems/3.3.0/bin
 prepend_to_path /opt/homebrew/bin
 prepend_to_path /opt/homebrew/opt/ruby/bin
 
+# Path for Go binaries
+prepend_to_path ~/go/bin
+
 
 # This prevents me from installing packages with pip without being
 # in a virtualenv first.

fish_functions/README.md (3871) → fish_functions/README.md (4074)

diff --git a/fish_functions/README.md b/fish_functions/README.md
index b8953f3..6759ea1 100644
--- a/fish_functions/README.md
+++ b/fish_functions/README.md
@@ -105,6 +105,15 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=functions)
   </dd>
 
   <dt>
+    <a href="https://github.com/alexwlchan/scripts/blob/main/fish_functions/go.fish">
+      <code>go.fish</code>
+    </a>
+  </dt>
+  <dd>
+    Remind me to use ./tool/go in Tailscale repos
+  </dd>
+
+  <dt>
     <a href="https://github.com/alexwlchan/scripts/blob/main/fish_functions/pip_sync.fish">
       <code>pip_sync.fish</code>
     </a>
@@ -140,4 +149,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=functions)
     Create and activate a new virtual environment
   </dd>
 </dl>
-<!-- [[[end]]] (sum: Jb3NAtzm/4) -->
\ No newline at end of file
+<!-- [[[end]]] (sum: FW10hKks6J) -->
\ No newline at end of file

fish_functions/go.fish (0) → fish_functions/go.fish (627)

diff --git a/fish_functions/go.fish b/fish_functions/go.fish
new file mode 100644
index 0000000..e8dd7eb
--- /dev/null
+++ b/fish_functions/go.fish
@@ -0,0 +1,18 @@
+###############################################################################
+# When I'm in the Tailscale repos, I should use ./tool/go instead of
+# the vanilla version of Go.
+#
+# This function will remind me to use ./tool/go instead of vanilla Go.
+###############################################################################
+
+function go --description 'Remind me to use ./tool/go in Tailscale repos'
+	set ROOT $(git rev-parse --show-toplevel 2>/dev/null)
+
+	if test -n "$ROOT"; and test -f "$ROOT/tool/go"
+		set_color red
+		echo "You should use ./tool/go instead!" >&2
+		set_color normal
+	else
+		command go $argv
+	end
+end