mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-23 23:22:57 -06:00
158a90b25b
* Grafana provider * grafana_data_source resource. Allows data sources to be created in Grafana. Supports all data source types that are accepted in the current version of Grafana, and will support any future ones that fit into the existing structure. * Vendoring of apparentlymart/go-grafana-api This is in anticipation of adding a Grafana provider plugin. * grafana_dashboard resource * Website documentation for the Grafana provider.
46 lines
890 B
Go
46 lines
890 B
Go
// Copyright 2013 by Dobrosław Żybort. All rights reserved.
|
||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||
|
||
package slug
|
||
|
||
func init() {
|
||
// Merge language subs with the default one
|
||
for _, sub := range []*map[rune]string{&deSub, &enSub, &plSub, &esSub} {
|
||
for key, value := range defaultSub {
|
||
(*sub)[key] = value
|
||
}
|
||
}
|
||
}
|
||
|
||
var defaultSub = map[rune]string{
|
||
'"': "",
|
||
'\'': "",
|
||
'’': "",
|
||
'‒': "-", // figure dash
|
||
'–': "-", // en dash
|
||
'—': "-", // em dash
|
||
'―': "-", // horizontal bar
|
||
}
|
||
|
||
var deSub = map[rune]string{
|
||
'&': "und",
|
||
'@': "an",
|
||
}
|
||
|
||
var enSub = map[rune]string{
|
||
'&': "and",
|
||
'@': "at",
|
||
}
|
||
|
||
var plSub = map[rune]string{
|
||
'&': "i",
|
||
'@': "na",
|
||
}
|
||
|
||
var esSub = map[rune]string{
|
||
'&': "y",
|
||
'@': "en",
|
||
}
|