Go Programming (Golang) reusing Struct to reduce heap usage : Please explain what is happening in following code.  The part I don't understand is the service struct.  The service struct is a wrapper around the APIClient struct.  When the NewAPIClient is called, it is embedding the service struct inside and copying onto itself.  I cannot seem to wrap my head around this. Please advise and elaborate.  Thank you. 

    type APIClient struct {
        cfg    *Configuration

        // Reuse a single struct instead of 
        // allocating one for each service on the heap.
        common service 

        // API Services
        AccountApi          *AccountApiService
        ContractApi         *ContractApiService
        FYIApi              *FYIApiService
        IBCustApi           *IBCustApiService
        MarketDataApi       *MarketDataApiService
        OrderApi            *OrderApiService
        PnLApi              *PnLApiService
        PortfolioApi        *PortfolioApiService
        PortfolioAnalystApi *PortfolioAnalystApiService
        ScannerApi          *ScannerApiService
        SessionApi          *SessionApiService
        TradesApi           *TradesApiService
    }

    type service struct {    
        client *APIClient    
    }

    func NewAPIClient(cfg *Configuration) *APIClient {    
        if cfg.HTTPClient == nil {    
                cfg.HTTPClient = http.DefaultClient    
        }    
    
        c := &APIClient{}    
        c.cfg = cfg    
        c.common.client = c    
       
        c.AccountApi = (*AccountApiService)(&c.common)    
        c.ContractApi = (*ContractApiService)(&c.common)
        c.FYIApi = (*FYIApiService)(&c.common)
        c.IBCustApi = (*IBCustApiService)(&c.common)
        c.MarketDataApi = (*MarketDataApiService)(&c.common)
        c.OrderApi = (*OrderApiService)(&c.common)
        c.PnLApi = (*PnLApiService)(&c.common)
        c.PortfolioApi = (*PortfolioApiService)(&c.common)
        c.PortfolioAnalystApi = (*PortfolioAnalystApiService)(&c.common)
        c.ScannerApi = (*ScannerApiService)(&c.common)
        c.SessionApi = (*SessionApiService)(&c.common)
        c.TradesApi = (*TradesApiService)(&c.common)

        return c
    }


 