mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
16 lines
295 B
Go
16 lines
295 B
Go
//go:build disablenotice
|
|
|
|
package config
|
|
|
|
import "bytes"
|
|
|
|
func setDisableNotice(stream []byte, cfg *Config) {
|
|
if !hasKeyInByteStream(stream, "disable_notice") {
|
|
cfg.DisableNotice = true
|
|
}
|
|
}
|
|
|
|
func hasKeyInByteStream(data []byte, key string) bool {
|
|
return bytes.Contains(data, []byte(key))
|
|
}
|