From d22a9c8610f2cd1bf0e021ec1f46e6200ed4a28f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 30 Dec 2022 15:57:01 +0100 Subject: chore(tvix/store/protos): more idiomatic go Pointed out by edef in https://cl.tvl.fyi/c/depot/+/7648/comment/4551ba4b_e89ade36/#, thanks! Change-Id: I6b0d317bb0210521622483cdf4cb557bc637a100 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7709 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: tazjin --- tvix/store/protos/castore.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tvix') diff --git a/tvix/store/protos/castore.go b/tvix/store/protos/castore.go index 9969da78a7ca..634aa7924f64 100644 --- a/tvix/store/protos/castore.go +++ b/tvix/store/protos/castore.go @@ -62,9 +62,7 @@ func (d *Directory) Validate() error { // We also track the last seen name in each of the three lists, // to ensure nodes are sorted by their names. - lastDirectoryName := "" - lastFileName := "" - lastSymlinkName := "" + var lastDirectoryName, lastFileName, lastSymlinkName string // helper function to only insert in sorted order. // used with the three lists above. -- cgit 1.4.1