File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/kotlin/org/virtuslab/pulumikotlin/codegen/step2intermediate Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,7 @@ data class PulumiName(
179
179
return when (namingFlags.language) {
180
180
Kotlin , Java -> {
181
181
if (namespace.isEmpty()) {
182
- val providerPrefix = providerName.split(" -" ).joinToString(" " ) { it.capitalize() }
183
- " ${providerPrefix} Functions"
182
+ " ${getProviderPrefix()} Functions"
184
183
} else {
185
184
namespace.last().replace(" ." , " _" ).capitalize() + " Functions"
186
185
}
@@ -190,8 +189,7 @@ data class PulumiName(
190
189
191
190
fun toResourceName (namingFlags : NamingFlags ): String {
192
191
return if (namingFlags.language == Kotlin && isProvider) {
193
- val providerPrefix = providerName.split(" -" ).joinToString(" " ) { it.capitalize() }
194
- " ${providerPrefix}${name.capitalize()} "
192
+ " ${getProviderPrefix()}${name.capitalize()} "
195
193
} else {
196
194
name.capitalize()
197
195
}
@@ -219,6 +217,8 @@ data class PulumiName(
219
217
}
220
218
}
221
219
220
+ private fun getProviderPrefix () = providerName.split(" -" ).joinToString(" " ) { it.capitalize() }
221
+
222
222
private fun packageToString (packageList : List <String >): String {
223
223
return packageList.joinToString(" ." )
224
224
}
You can’t perform that action at this time.
0 commit comments