<commit_before>// Copyright 2016 The PIO Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

package distro

import (
	"io/ioutil"
)

// DTModel returns platform model info from the Linux device tree (/proc/device-tree/model), and
// returns "unknown" on non-linux systems or if the file is missing.
func DTModel() string {
	lock.Lock()
	defer lock.Unlock()

	if dtModel == "" {
		dtModel = "unknown"
		if isLinux {
			// Read model from device tree.
			if bytes, err := ioutil.ReadFile("/proc/device-tree/model"); err == nil {
				if model := splitNull(bytes); len(model) > 0 {
					dtModel = model[0]
				}
			}
		}
	}
	return dtModel
}<commit_msg>fix devtree `"unknown"` to `"<unknown>"` per conversation<commit_after>// Copyright 2016 The PIO Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

package distro

import (
	"io/ioutil"
)

// DTModel returns platform model info from the Linux device tree (/proc/device-tree/model), and
// returns "unknown" on non-linux systems or if the file is missing.
func DTModel() string {
	lock.Lock()
	defer lock.Unlock()

	if dtModel == "" {
		dtModel = "<unknown>"
		if isLinux {
			// Read model from device tree.
			if bytes, err := ioutil.ReadFile("/proc/device-tree/model"); err == nil {
				if model := splitNull(bytes); len(model) > 0 {
					dtModel = model[0]
				}
			}
		}
	}
	return dtModel
}
{'fraction_non_alphanumeric': 0.1219195849546044, 'fraction_numerical': 0.010376134889753566, 'mean_word_length': 3.1590296495956873, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5287490', 'n_tokens_mistral': 538, 'n_tokens_neox': 480, 'n_words': 184}