From b1d92b395322f2164ccfb44b0f7caebbaece6b62 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 22 Apr 2022 16:29:59 +0200 Subject: Refactor: Restructure project - Add an internal folder where all the internal code lives - Make a state.go and state_test.go for the public interface This gives a more clear separation between functions and modules. It also makes this a more typical Go project setup. --- internal/openvpn.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 internal/openvpn.go (limited to 'internal/openvpn.go') diff --git a/internal/openvpn.go b/internal/openvpn.go new file mode 100644 index 0000000..1b2e626 --- /dev/null +++ b/internal/openvpn.go @@ -0,0 +1,12 @@ +package internal + +func (server *Server) OpenVPNGetConfig() (string, error) { + profile_id := server.Profiles.Current + configOpenVPN, _, configErr := server.APIConnectOpenVPN(profile_id) + + if configErr != nil { + return "", configErr + } + + return configOpenVPN, nil +} -- cgit v1.2.3