<commit_before>package qtypes

import (
	"log"
	"fmt"
	"strings"
	"github.com/zpatrick/go-config"
	"github.com/qnib/qframe-utils"
)

const (
	FILTER = "filter"
	COLLECTOR = "collector"
	HANDLER = "handler"
)

type Plugin struct {
	QChan 			QChan
	Cfg 			config.Config
	Typ				string
	Pkg				string
	Version 		string
	Name 			string
	LogOnlyPlugs 	[]string
}

func NewPlugin(qChan QChan, cfg config.Config) Plugin {
	return Plugin{
		QChan: qChan,
		Cfg: cfg,
	}
}


func NewNamedPlugin(qChan QChan, cfg config.Config, typ, pkg, name, version string) Plugin {
	p := Plugin{
		QChan: 			qChan,
		Cfg:   			cfg,
		Typ:   			typ,
		Pkg:  			pkg,
		Version:		version,
		Name: 			name,
		LogOnlyPlugs:   []string{},
	}
	logPlugs, err := cfg.String("log.only-plugins")
	if err == nil {
		p.LogOnlyPlugs = strings.Split(logPlugs, ",")
	}
	return p
}

<commit_msg>use pointer to config.Config<commit_after>package qtypes

import (
	"log"
	"fmt"
	"strings"
	"github.com/zpatrick/go-config"
	"github.com/qnib/qframe-utils"
)

const (
	FILTER = "filter"
	COLLECTOR = "collector"
	HANDLER = "handler"
)

type Plugin struct {
	QChan 			QChan
	Cfg 			*config.Config
	Typ				string
	Pkg				string
	Version 		string
	Name 			string
	LogOnlyPlugs 	[]string
}

func NewPlugin(qChan QChan, cfg *config.Config) Plugin {
	return Plugin{
		QChan: qChan,
		Cfg: cfg,
	}
}


func NewNamedPlugin(qChan QChan, cfg *config.Config, typ, pkg, name, version string) Plugin {
	p := Plugin{
		QChan: 			qChan,
		Cfg:   			cfg,
		Typ:   			typ,
		Pkg:  			pkg,
		Version:		version,
		Name: 			name,
		LogOnlyPlugs:   []string{},
	}
	logPlugs, err := cfg.String("log.only-plugins")
	if err == nil {
		p.LogOnlyPlugs = strings.Split(logPlugs, ",")
	}
	return p
}


{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0, 'mean_word_length': 3.068235294117647, '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': '4345860', 'n_tokens_mistral': 805, 'n_tokens_neox': 719, 'n_words': 165}