You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: portfolio.go
    path of file: ./repos/gocryptotrader/cmd/portfolio
    
    the code of the file until where you have to start completion: package main

import (
	"context"
	"flag"
	"fmt"
	"log"
	"os"

	"github.com/thrasher-corp/gocryptotrader/config"
	"github.com/thrasher-corp/gocryptotrader/currenc
    
func getOnlineOfflinePortfolio(coins []portfolio.Coin, online bool) {
	var totals float64
	for _, x := range coins {
		value := priceMap[x.Coin.Item] * x.Balance
		totals += value
		log.Printf("\t%v %v Subtotal: $%.2f Coin percentage: %.2f%%\n", x.Coin,
			x.Balance, value, x.Percentage)
	}
	if !online {
		printSummary("\tOffline balance", totals)
	} else {
		printSummary("\tOnline balance", totals)
	}
}