<commit_before>package model

import (
	"fmt"
	"time"

	kubeModels "git.containerum.net/ch/kube-client/pkg/model"
)

const (
	CreationTimeFormat = "2 Jan 2006 15:04 -0700 MST "
)

var (
	_ TableRenderer = &Volume{}
	_ TableRenderer = &VolumeList{}
)

type VolumeList []Volume

func (_ VolumeList) TableHeaders() []string {
	return new(Volume).TableHeaders()
}

func (list VolumeList) TableRows() [][]string {
	rows := make([][]string, 0, len(list))
	for _, volume := range list {
		rows = append(rows, volume.TableRows()...)
	}
	return rows
}

type Volume struct {
	Label     string
	CreatedAt time.Time
	Access    string
	Replicas  uint
	Storage   uint
}

func (_ *Volume) TableHeaders() []string {
	return []string{"Label", "Created", "Access", "Replicas", "Storage, GB"}
}<commit_msg>add VolumeListFromKube<commit_after>package model

import (
	"fmt"
	"time"

	kubeModels "git.containerum.net/ch/kube-client/pkg/model"
)

const (
	CreationTimeFormat = "2 Jan 2006 15:04 -0700 MST "
)

var (
	_ TableRenderer = &Volume{}
	_ TableRenderer = &VolumeList{}
)

type VolumeList []Volume

func VolumeListFromKube(kubeList []kubeModels.Volume) VolumeList {
	var list VolumeList = make([]Volume, 0, len(kubeList))
	for _, volume := range kubeList {
		list = append(list, VolumeFromKube(volume))
	}
	return list
}

func (_ VolumeList) TableHeaders() []string {
	return new(Volume).TableHeaders()
}

func (list VolumeList) TableRows() [][]string {
	rows := make([][]string, 0, len(list))
	for _, volume := range list {
		rows = append(rows, volume.TableRows()...)
	}
	return rows
}

type Volume struct {
	Label     string
	CreatedAt time.Time
	Access    string
	Replicas  uint
	Storage   uint
}

func (_ *Volume) TableHeaders() []string {
	return []string{"Label", "Created", "Access", "Replicas", "Storage, GB"}
}
{'fraction_non_alphanumeric': 0.14562569213732005, 'fraction_numerical': 0.016057585825027684, 'mean_word_length': 4.362017804154303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7418849', 'n_tokens_mistral': 648, 'n_tokens_neox': 622, 'n_words': 162}