From 7f81b51c1f84b0e17f4f7e7f5239ec93e0eddfff Mon Sep 17 00:00:00 2001
From: Pim van Pelt <pim@ipng.nl>
Date: Tue, 17 Jun 2025 00:47:08 +0200
Subject: [PATCH] Move Go code to src/

---
 Makefile                                              | 4 ++--
 debian/rules                                          | 2 +-
 {agentx => src/agentx}/agentx.go                      | 0
 {agentx => src/agentx}/agentx_test.go                 | 0
 {config => src/config}/config.go                      | 0
 {config => src/config}/config_test.go                 | 0
 {go-agentx => src/go-agentx}/.gitignore               | 0
 {go-agentx => src/go-agentx}/AUTHORS                  | 0
 {go-agentx => src/go-agentx}/LICENSE                  | 0
 {go-agentx => src/go-agentx}/README.md                | 0
 {go-agentx => src/go-agentx}/client.go                | 0
 {go-agentx => src/go-agentx}/environment_test.go      | 0
 {go-agentx => src/go-agentx}/go.mod                   | 0
 {go-agentx => src/go-agentx}/go.sum                   | 0
 {go-agentx => src/go-agentx}/handler.go               | 0
 {go-agentx => src/go-agentx}/helper_test.go           | 0
 {go-agentx => src/go-agentx}/list_handler.go          | 0
 {go-agentx => src/go-agentx}/list_handler_test.go     | 0
 {go-agentx => src/go-agentx}/list_item.go             | 0
 {go-agentx => src/go-agentx}/marshaler/multi.go       | 0
 {go-agentx => src/go-agentx}/pdu/allocate_index.go    | 0
 {go-agentx => src/go-agentx}/pdu/close.go             | 0
 {go-agentx => src/go-agentx}/pdu/deallocate_index.go  | 0
 {go-agentx => src/go-agentx}/pdu/error.go             | 0
 {go-agentx => src/go-agentx}/pdu/flags.go             | 0
 {go-agentx => src/go-agentx}/pdu/get.go               | 0
 {go-agentx => src/go-agentx}/pdu/get_next.go          | 0
 {go-agentx => src/go-agentx}/pdu/header.go            | 0
 {go-agentx => src/go-agentx}/pdu/header_packet.go     | 0
 {go-agentx => src/go-agentx}/pdu/object_identifier.go | 0
 {go-agentx => src/go-agentx}/pdu/octet_string.go      | 0
 {go-agentx => src/go-agentx}/pdu/open.go              | 0
 {go-agentx => src/go-agentx}/pdu/packet.go            | 0
 {go-agentx => src/go-agentx}/pdu/range.go             | 0
 {go-agentx => src/go-agentx}/pdu/ranges.go            | 0
 {go-agentx => src/go-agentx}/pdu/reason.go            | 0
 {go-agentx => src/go-agentx}/pdu/register.go          | 0
 {go-agentx => src/go-agentx}/pdu/response.go          | 0
 {go-agentx => src/go-agentx}/pdu/timeout.go           | 0
 {go-agentx => src/go-agentx}/pdu/type.go              | 0
 {go-agentx => src/go-agentx}/pdu/unregister.go        | 0
 {go-agentx => src/go-agentx}/pdu/variable.go          | 0
 {go-agentx => src/go-agentx}/pdu/variable_type.go     | 0
 {go-agentx => src/go-agentx}/pdu/variables.go         | 0
 {go-agentx => src/go-agentx}/request.go               | 0
 {go-agentx => src/go-agentx}/session.go               | 0
 {go-agentx => src/go-agentx}/session_test.go          | 0
 {go-agentx => src/go-agentx}/shell.nix                | 0
 {go-agentx => src/go-agentx}/snmpd.conf               | 0
 {go-agentx => src/go-agentx}/value/oid.go             | 0
 {go-agentx => src/go-agentx}/value/oid_test.go        | 0
 go.mod => src/go.mod                                  | 0
 go.sum => src/go.sum                                  | 0
 {ifmib => src/ifmib}/ifmib.go                         | 0
 {ifmib => src/ifmib}/ifmib_test.go                    | 0
 {logger => src/logger}/logger.go                      | 0
 {logger => src/logger}/logger_test.go                 | 0
 main.go => src/main.go                                | 0
 main_test.go => src/main_test.go                      | 0
 {vppstats => src/vppstats}/stats.go                   | 0
 {vppstats => src/vppstats}/stats_test.go              | 0
 61 files changed, 3 insertions(+), 3 deletions(-)
 rename {agentx => src/agentx}/agentx.go (100%)
 rename {agentx => src/agentx}/agentx_test.go (100%)
 rename {config => src/config}/config.go (100%)
 rename {config => src/config}/config_test.go (100%)
 rename {go-agentx => src/go-agentx}/.gitignore (100%)
 rename {go-agentx => src/go-agentx}/AUTHORS (100%)
 rename {go-agentx => src/go-agentx}/LICENSE (100%)
 rename {go-agentx => src/go-agentx}/README.md (100%)
 rename {go-agentx => src/go-agentx}/client.go (100%)
 rename {go-agentx => src/go-agentx}/environment_test.go (100%)
 rename {go-agentx => src/go-agentx}/go.mod (100%)
 rename {go-agentx => src/go-agentx}/go.sum (100%)
 rename {go-agentx => src/go-agentx}/handler.go (100%)
 rename {go-agentx => src/go-agentx}/helper_test.go (100%)
 rename {go-agentx => src/go-agentx}/list_handler.go (100%)
 rename {go-agentx => src/go-agentx}/list_handler_test.go (100%)
 rename {go-agentx => src/go-agentx}/list_item.go (100%)
 rename {go-agentx => src/go-agentx}/marshaler/multi.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/allocate_index.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/close.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/deallocate_index.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/error.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/flags.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/get.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/get_next.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/header.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/header_packet.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/object_identifier.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/octet_string.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/open.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/packet.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/range.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/ranges.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/reason.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/register.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/response.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/timeout.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/type.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/unregister.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/variable.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/variable_type.go (100%)
 rename {go-agentx => src/go-agentx}/pdu/variables.go (100%)
 rename {go-agentx => src/go-agentx}/request.go (100%)
 rename {go-agentx => src/go-agentx}/session.go (100%)
 rename {go-agentx => src/go-agentx}/session_test.go (100%)
 rename {go-agentx => src/go-agentx}/shell.nix (100%)
 rename {go-agentx => src/go-agentx}/snmpd.conf (100%)
 rename {go-agentx => src/go-agentx}/value/oid.go (100%)
 rename {go-agentx => src/go-agentx}/value/oid_test.go (100%)
 rename go.mod => src/go.mod (100%)
 rename go.sum => src/go.sum (100%)
 rename {ifmib => src/ifmib}/ifmib.go (100%)
 rename {ifmib => src/ifmib}/ifmib_test.go (100%)
 rename {logger => src/logger}/logger.go (100%)
 rename {logger => src/logger}/logger_test.go (100%)
 rename main.go => src/main.go (100%)
 rename main_test.go => src/main_test.go (100%)
 rename {vppstats => src/vppstats}/stats.go (100%)
 rename {vppstats => src/vppstats}/stats_test.go (100%)

diff --git a/Makefile b/Makefile
index 53988f6..9d9b7cc 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,11 @@
 
 # Build the govpp-snmp-agentx binary
 build:
-	go build -o govpp-snmp-agentx .
+	cd src && go build -o ../govpp-snmp-agentx .
 
 # Run all tests
 test:
-	go test ./...
+	cd src && go test ./...
 
 # Clean build artifacts
 clean:
diff --git a/debian/rules b/debian/rules
index dd48f25..e49a4fa 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ export GOPATH = $(CURDIR)/debian/go
 	dh $@
 
 override_dh_auto_build:
-	go build -v -ldflags="-s -w" -o govpp-snmp-agentx .
+	cd src && go build -v -ldflags="-s -w" -o ../govpp-snmp-agentx .
 
 override_dh_auto_install:
 	install -D -m 0755 govpp-snmp-agentx debian/govpp-snmp-agentx/usr/sbin/govpp-snmp-agentx
diff --git a/agentx/agentx.go b/src/agentx/agentx.go
similarity index 100%
rename from agentx/agentx.go
rename to src/agentx/agentx.go
diff --git a/agentx/agentx_test.go b/src/agentx/agentx_test.go
similarity index 100%
rename from agentx/agentx_test.go
rename to src/agentx/agentx_test.go
diff --git a/config/config.go b/src/config/config.go
similarity index 100%
rename from config/config.go
rename to src/config/config.go
diff --git a/config/config_test.go b/src/config/config_test.go
similarity index 100%
rename from config/config_test.go
rename to src/config/config_test.go
diff --git a/go-agentx/.gitignore b/src/go-agentx/.gitignore
similarity index 100%
rename from go-agentx/.gitignore
rename to src/go-agentx/.gitignore
diff --git a/go-agentx/AUTHORS b/src/go-agentx/AUTHORS
similarity index 100%
rename from go-agentx/AUTHORS
rename to src/go-agentx/AUTHORS
diff --git a/go-agentx/LICENSE b/src/go-agentx/LICENSE
similarity index 100%
rename from go-agentx/LICENSE
rename to src/go-agentx/LICENSE
diff --git a/go-agentx/README.md b/src/go-agentx/README.md
similarity index 100%
rename from go-agentx/README.md
rename to src/go-agentx/README.md
diff --git a/go-agentx/client.go b/src/go-agentx/client.go
similarity index 100%
rename from go-agentx/client.go
rename to src/go-agentx/client.go
diff --git a/go-agentx/environment_test.go b/src/go-agentx/environment_test.go
similarity index 100%
rename from go-agentx/environment_test.go
rename to src/go-agentx/environment_test.go
diff --git a/go-agentx/go.mod b/src/go-agentx/go.mod
similarity index 100%
rename from go-agentx/go.mod
rename to src/go-agentx/go.mod
diff --git a/go-agentx/go.sum b/src/go-agentx/go.sum
similarity index 100%
rename from go-agentx/go.sum
rename to src/go-agentx/go.sum
diff --git a/go-agentx/handler.go b/src/go-agentx/handler.go
similarity index 100%
rename from go-agentx/handler.go
rename to src/go-agentx/handler.go
diff --git a/go-agentx/helper_test.go b/src/go-agentx/helper_test.go
similarity index 100%
rename from go-agentx/helper_test.go
rename to src/go-agentx/helper_test.go
diff --git a/go-agentx/list_handler.go b/src/go-agentx/list_handler.go
similarity index 100%
rename from go-agentx/list_handler.go
rename to src/go-agentx/list_handler.go
diff --git a/go-agentx/list_handler_test.go b/src/go-agentx/list_handler_test.go
similarity index 100%
rename from go-agentx/list_handler_test.go
rename to src/go-agentx/list_handler_test.go
diff --git a/go-agentx/list_item.go b/src/go-agentx/list_item.go
similarity index 100%
rename from go-agentx/list_item.go
rename to src/go-agentx/list_item.go
diff --git a/go-agentx/marshaler/multi.go b/src/go-agentx/marshaler/multi.go
similarity index 100%
rename from go-agentx/marshaler/multi.go
rename to src/go-agentx/marshaler/multi.go
diff --git a/go-agentx/pdu/allocate_index.go b/src/go-agentx/pdu/allocate_index.go
similarity index 100%
rename from go-agentx/pdu/allocate_index.go
rename to src/go-agentx/pdu/allocate_index.go
diff --git a/go-agentx/pdu/close.go b/src/go-agentx/pdu/close.go
similarity index 100%
rename from go-agentx/pdu/close.go
rename to src/go-agentx/pdu/close.go
diff --git a/go-agentx/pdu/deallocate_index.go b/src/go-agentx/pdu/deallocate_index.go
similarity index 100%
rename from go-agentx/pdu/deallocate_index.go
rename to src/go-agentx/pdu/deallocate_index.go
diff --git a/go-agentx/pdu/error.go b/src/go-agentx/pdu/error.go
similarity index 100%
rename from go-agentx/pdu/error.go
rename to src/go-agentx/pdu/error.go
diff --git a/go-agentx/pdu/flags.go b/src/go-agentx/pdu/flags.go
similarity index 100%
rename from go-agentx/pdu/flags.go
rename to src/go-agentx/pdu/flags.go
diff --git a/go-agentx/pdu/get.go b/src/go-agentx/pdu/get.go
similarity index 100%
rename from go-agentx/pdu/get.go
rename to src/go-agentx/pdu/get.go
diff --git a/go-agentx/pdu/get_next.go b/src/go-agentx/pdu/get_next.go
similarity index 100%
rename from go-agentx/pdu/get_next.go
rename to src/go-agentx/pdu/get_next.go
diff --git a/go-agentx/pdu/header.go b/src/go-agentx/pdu/header.go
similarity index 100%
rename from go-agentx/pdu/header.go
rename to src/go-agentx/pdu/header.go
diff --git a/go-agentx/pdu/header_packet.go b/src/go-agentx/pdu/header_packet.go
similarity index 100%
rename from go-agentx/pdu/header_packet.go
rename to src/go-agentx/pdu/header_packet.go
diff --git a/go-agentx/pdu/object_identifier.go b/src/go-agentx/pdu/object_identifier.go
similarity index 100%
rename from go-agentx/pdu/object_identifier.go
rename to src/go-agentx/pdu/object_identifier.go
diff --git a/go-agentx/pdu/octet_string.go b/src/go-agentx/pdu/octet_string.go
similarity index 100%
rename from go-agentx/pdu/octet_string.go
rename to src/go-agentx/pdu/octet_string.go
diff --git a/go-agentx/pdu/open.go b/src/go-agentx/pdu/open.go
similarity index 100%
rename from go-agentx/pdu/open.go
rename to src/go-agentx/pdu/open.go
diff --git a/go-agentx/pdu/packet.go b/src/go-agentx/pdu/packet.go
similarity index 100%
rename from go-agentx/pdu/packet.go
rename to src/go-agentx/pdu/packet.go
diff --git a/go-agentx/pdu/range.go b/src/go-agentx/pdu/range.go
similarity index 100%
rename from go-agentx/pdu/range.go
rename to src/go-agentx/pdu/range.go
diff --git a/go-agentx/pdu/ranges.go b/src/go-agentx/pdu/ranges.go
similarity index 100%
rename from go-agentx/pdu/ranges.go
rename to src/go-agentx/pdu/ranges.go
diff --git a/go-agentx/pdu/reason.go b/src/go-agentx/pdu/reason.go
similarity index 100%
rename from go-agentx/pdu/reason.go
rename to src/go-agentx/pdu/reason.go
diff --git a/go-agentx/pdu/register.go b/src/go-agentx/pdu/register.go
similarity index 100%
rename from go-agentx/pdu/register.go
rename to src/go-agentx/pdu/register.go
diff --git a/go-agentx/pdu/response.go b/src/go-agentx/pdu/response.go
similarity index 100%
rename from go-agentx/pdu/response.go
rename to src/go-agentx/pdu/response.go
diff --git a/go-agentx/pdu/timeout.go b/src/go-agentx/pdu/timeout.go
similarity index 100%
rename from go-agentx/pdu/timeout.go
rename to src/go-agentx/pdu/timeout.go
diff --git a/go-agentx/pdu/type.go b/src/go-agentx/pdu/type.go
similarity index 100%
rename from go-agentx/pdu/type.go
rename to src/go-agentx/pdu/type.go
diff --git a/go-agentx/pdu/unregister.go b/src/go-agentx/pdu/unregister.go
similarity index 100%
rename from go-agentx/pdu/unregister.go
rename to src/go-agentx/pdu/unregister.go
diff --git a/go-agentx/pdu/variable.go b/src/go-agentx/pdu/variable.go
similarity index 100%
rename from go-agentx/pdu/variable.go
rename to src/go-agentx/pdu/variable.go
diff --git a/go-agentx/pdu/variable_type.go b/src/go-agentx/pdu/variable_type.go
similarity index 100%
rename from go-agentx/pdu/variable_type.go
rename to src/go-agentx/pdu/variable_type.go
diff --git a/go-agentx/pdu/variables.go b/src/go-agentx/pdu/variables.go
similarity index 100%
rename from go-agentx/pdu/variables.go
rename to src/go-agentx/pdu/variables.go
diff --git a/go-agentx/request.go b/src/go-agentx/request.go
similarity index 100%
rename from go-agentx/request.go
rename to src/go-agentx/request.go
diff --git a/go-agentx/session.go b/src/go-agentx/session.go
similarity index 100%
rename from go-agentx/session.go
rename to src/go-agentx/session.go
diff --git a/go-agentx/session_test.go b/src/go-agentx/session_test.go
similarity index 100%
rename from go-agentx/session_test.go
rename to src/go-agentx/session_test.go
diff --git a/go-agentx/shell.nix b/src/go-agentx/shell.nix
similarity index 100%
rename from go-agentx/shell.nix
rename to src/go-agentx/shell.nix
diff --git a/go-agentx/snmpd.conf b/src/go-agentx/snmpd.conf
similarity index 100%
rename from go-agentx/snmpd.conf
rename to src/go-agentx/snmpd.conf
diff --git a/go-agentx/value/oid.go b/src/go-agentx/value/oid.go
similarity index 100%
rename from go-agentx/value/oid.go
rename to src/go-agentx/value/oid.go
diff --git a/go-agentx/value/oid_test.go b/src/go-agentx/value/oid_test.go
similarity index 100%
rename from go-agentx/value/oid_test.go
rename to src/go-agentx/value/oid_test.go
diff --git a/go.mod b/src/go.mod
similarity index 100%
rename from go.mod
rename to src/go.mod
diff --git a/go.sum b/src/go.sum
similarity index 100%
rename from go.sum
rename to src/go.sum
diff --git a/ifmib/ifmib.go b/src/ifmib/ifmib.go
similarity index 100%
rename from ifmib/ifmib.go
rename to src/ifmib/ifmib.go
diff --git a/ifmib/ifmib_test.go b/src/ifmib/ifmib_test.go
similarity index 100%
rename from ifmib/ifmib_test.go
rename to src/ifmib/ifmib_test.go
diff --git a/logger/logger.go b/src/logger/logger.go
similarity index 100%
rename from logger/logger.go
rename to src/logger/logger.go
diff --git a/logger/logger_test.go b/src/logger/logger_test.go
similarity index 100%
rename from logger/logger_test.go
rename to src/logger/logger_test.go
diff --git a/main.go b/src/main.go
similarity index 100%
rename from main.go
rename to src/main.go
diff --git a/main_test.go b/src/main_test.go
similarity index 100%
rename from main_test.go
rename to src/main_test.go
diff --git a/vppstats/stats.go b/src/vppstats/stats.go
similarity index 100%
rename from vppstats/stats.go
rename to src/vppstats/stats.go
diff --git a/vppstats/stats_test.go b/src/vppstats/stats_test.go
similarity index 100%
rename from vppstats/stats_test.go
rename to src/vppstats/stats_test.go