<commit_before>package main

import (
	"encoding/json"
	"errors"
	"fmt"
	"github.com/gogo/protobuf/proto"
	mesos "github.com/mesos/mesos-go/mesosproto"
	"io/ioutil"
	"os"
)

var ErrNoConfig = errors.New("No Config File Present")

func DefaultProfile() *Profile {
	return &Profile{
		Master: "127.0.0.1:5050",
		FrameworkInfo: &mesos.FrameworkInfo{
			Name: proto.String("mesos-cli"),
		},
	}
}

// Profile contains environment specific options
type Profile struct {
	Master        string               `json:"master"`
	FrameworkInfo *mesos.FrameworkInfo `json:"framework_info"`
}

// ProfileOptions are functional profile options
type ProfileOption func(*Profile)

func WithMaster(m string) ProfileOption {
	return func(p *Profile) {
		p.Master = m
	}
}

// Merge the options from another profile
func (p *Profile) Merge(other *Profile) {<commit_msg>Ensure CLI defaults do not override other values<commit_after>package main

import (
	"encoding/json"
	"errors"
	"fmt"
	"github.com/gogo/protobuf/proto"
	mesos "github.com/mesos/mesos-go/mesosproto"
	"io/ioutil"
	"os"
)

var ErrNoConfig = errors.New("No Config File Present")

func DefaultProfile() *Profile {
	return &Profile{
		Master: "127.0.0.1:5050",
		FrameworkInfo: &mesos.FrameworkInfo{
			Name: proto.String("mesos-cli"),
		},
	}
}

// Profile contains environment specific options
type Profile struct {
	Master        string               `json:"master"`
	FrameworkInfo *mesos.FrameworkInfo `json:"framework_info"`
}

// ProfileOptions are functional profile options
type ProfileOption func(*Profile)

func WithMaster(m string) ProfileOption {
	return func(p *Profile) {
		// Checks to be sure we do not override with a default value from CLI
		if m != DefaultProfile().Master {
			p.Master = m
		}
	}
}

// Merge the options from another profile
func (p *Profile) Merge(other *Profile) {
{'fraction_non_alphanumeric': 0.12067099567099566, 'fraction_numerical': 0.010822510822510822, 'mean_word_length': 4.010840108401084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '586904', 'n_tokens_mistral': 628, 'n_tokens_neox': 602, 'n_words': 164}