Open kkalavantavanich opened 4 years ago
Hi @kkalavantavanich
thanks for your question regarding this :smile:
Is there any particular reasons to use
Option
and notSome
?
I found this is quite a few places as a good practice due to two reasons
null
. Maybe not in this case. However image refactoring this into a method that reads a file and you parse some content. I'm saying as soon as you rely on some java apis this breaksWhy is this even an Option? Wouldn't just using the value provide a better API?
I agree on this one. It should have probably been to methods
def withTag(tag: String): DockerAlias = copy(tag = Some(tag))
def withNoTag(): DockerAlias = copy(tag = None)
If it's possible to enhance this in a binary compatible way, I'm open for pull requests :smiling_face_with_three_hearts:
I was looking at the documentation here: https://www.scala-sbt.org/sbt-native-packager/formats/docker.html#publishing-settings. The documentation provides this description about
dockerAliases
:My questions are:
Option
and notSome
?Option
? Wouldn't just using the value provide a better API?