<commit_before>package app

import (
	"github.com/gilcrest/go-api-basic/datastore"
	"github.com/rs/zerolog"
)

// Application is the main server struct for Guestbook. It contains the state of
// the most recently read message of the day.
type Application struct {
	EnvName EnvName
	// PostgreSQL database
	DS datastore.Datastore
	// Logger
	Logger zerolog.Logger
}

// NewApplication creates a new application struct
func NewApplication(en EnvName, ds datastore.Datastore, log zerolog.Logger) *Application {
	return &Application{
		EnvName: en,
		DS:      ds,
		Logger:  log,
	}
}

// EnvName is the environment Name int representation
// Using iota, 1 (Production) is the lowest,
// 2 (Staging) is 2nd lowest, and so on...
type EnvName uint8

// EnvName of environment.
const (
	Production EnvName = iota + 1 // Production (1)
	Staging                       // Staging (2)
	QA                            // QA (3)
	Dev                           // Dev (4)
)

func (n EnvName) String() string {
	switch n {
	case Production:
		return "Production"
	case Staging:
		return "Staging"
	case QA:
		return "QA"
	case Dev:
		return "Dev"
	}
	return "unknown_name"
}<commit_msg>switch dev to local env<commit_after>package app

import (
	"github.com/gilcrest/go-api-basic/datastore"
	"github.com/rs/zerolog"
)

// Application is the main server struct for Guestbook. It contains the state of
// the most recently read message of the day.
type Application struct {
	EnvName EnvName
	// PostgreSQL database
	DS datastore.Datastore
	// Logger
	Logger zerolog.Logger
}

// NewApplication creates a new application struct
func NewApplication(en EnvName, ds datastore.Datastore, log zerolog.Logger) *Application {
	return &Application{
		EnvName: en,
		DS:      ds,
		Logger:  log,
	}
}

// EnvName is the environment Name int representation
// Using iota, 1 (Production) is the lowest,
// 2 (Staging) is 2nd lowest, and so on...
type EnvName uint8

// EnvName of environment.
const (
	Production EnvName = iota + 1 // Production (1)
	Staging                       // Staging (2)
	QA                            // QA (3)
	Local                         // Local (4)
)

func (n EnvName) String() string {
	switch n {
	case Production:
		return "Production"
	case Staging:
		return "Staging"
	case QA:
		return "QA"
	case Local:
		return "Local"
	}
	return "unknown_name"
}
{'fraction_non_alphanumeric': 0.09592529711375213, 'fraction_numerical': 0.007640067911714771, 'mean_word_length': 2.642967542503864, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4753046', 'n_tokens_mistral': 791, 'n_tokens_neox': 750, 'n_words': 262}