func (gui *GUI) SaveConfig(config Config) error {
	configBytes, err := json.Marshal(&config)
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(
		filepath.Join(gui.workingDir, "config.json"),
		configBytes,
		0644)
	if err != nil {
		return err
	}
	return nil
}
SaveConfig saves the configuration to disk
package gui
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"path/filepath"
	"time"
)
func (gui *GUI) GetPoolList() ([]PoolData, error) {
	var pools []PoolData
	resp, err := http.Get(fmt.Sprintf("%s/pool-list?allowed=true", gui.config.APIEndpoint))
	if err != nil {
		return pools, err
	}
	err = json.NewDecoder(resp.Body).Decode(&pools)
	if err != nil {
		return pools, err
	}
	return pools, nil
}
func (gui *GUI) GetPool(id int) (PoolData, error) {
	var pool PoolData
	resp, err := http.Get(fmt.Sprintf("%s/pool/%d", gui.config.APIEndpoint, id))
	if err != nil {
		return pool, err
	}
	err = json.NewDecoder(resp.Body).Decode(&pool)
	if err != nil {
		return pool, err
	}
	return pool, nil
}