oh-my-posh/src/config/notice_disable.go
Jan De Dobbeleer 9e238adbb9
Some checks failed
Code QL / code-ql (push) Has been cancelled
Azure Static Web Apps CI/CD / Build and Deploy (push) Has been cancelled
Release / changelog (push) Has been cancelled
Release / artifacts (push) Has been cancelled
chore(notice): add compiler flag to disable by default
resolves #5387
2024-08-01 07:56:17 +02:00

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))
}