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: state.go
    path of file: ./repos/gotosocial/internal/config
    
    the code of the file until where you have to start completion: // GoToSocial
// Copyright (C) GoToSocial Authors admin@gotosocial.org
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribut
    
func NewState() *ConfigState {
	viper := viper.New()

	// Flag 'some-flag-name' becomes env var 'GTS_SOME_FLAG_NAME'
	viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
	viper.SetEnvPrefix("gts")

	// Load appropriate named vals from env
	viper.AutomaticEnv()

	// Create new ConfigState with defaults
	state := &ConfigState{
		viper:  viper,
		config: Defaults,
	}

	// Perform initial load into viper
	state.reloadToViper()

	return state
}