Skip to content

Commit

Permalink
add method addWithCustomTags
Browse files Browse the repository at this point in the history
  • Loading branch information
klu2 authored Jul 5, 2022
2 parents d6c6e71 + f1e0d4d commit 7ecebe9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repositories {
}
dependencies {
implementation("io.cloudflight.structurizr:structurizr-autoconfigure:1.0.0")
implementation("io.cloudflight.structurizr:structurizr-autoconfigure:1.0.1")
}
````

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,12 @@ class ElementConfiguration {
}

data class Dependency(val element: Element, val description: String, val technology: String, val interactionStyle: InteractionStyle? = null)

/**
* Adds the given [container] to this [DeploymentNode] and also adds all tags which are not part of [Container.getDefaultTags]
*/
fun DeploymentNode.addWithCustomTags(container: Container) {
this.add(container).apply {
addTags(*container.tagsAsSet.subtract(container.defaultTags).toTypedArray())
}
}

0 comments on commit 7ecebe9

Please sign in to comment.