From 12a4c94faf5198d811d2d36d89167d4c9a5f6a86 Mon Sep 17 00:00:00 2001
From: Pea Nut <peanut2@systemli.org>
Date: Thu, 20 Jun 2024 12:24:52 +0200
Subject: [PATCH] Fix comment in Bonafide.GetBestLocation

---
 pkg/vpn/bonafide/bonafide.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go
index 6dc2d0b1..b055332b 100644
--- a/pkg/vpn/bonafide/bonafide.go
+++ b/pkg/vpn/bonafide/bonafide.go
@@ -316,12 +316,13 @@ func (b *Bonafide) SetAutomaticGateway() {
 	b.gateways.setAutomaticChoice()
 }
 
+// This function is part of the apiInterface
+// In the v5 implementation, some errors can happen
+// In this case we always return nil as error
 func (b *Bonafide) GetBestLocation(transport string) (string, error) {
 	if b.gateways == nil {
 		return "", nil
 	}
-	// in the v5/menshen implementation, some errors can happen, this
-	// function will be part of an interface
 	return b.gateways.getBestLocation(transport, b.tzOffsetHours), nil
 }
 
-- 
GitLab