32 lines
403 B
Plaintext
32 lines
403 B
Plaintext
include::../description.adoc[]
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
----
|
|
var (
|
|
ip = "192.168.12.42"
|
|
port = 3333
|
|
)
|
|
|
|
SocketClient(ip, port)
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
config, err := ReadConfig("properties.ini")
|
|
|
|
ip := config["ip"]
|
|
port := config["ip"]
|
|
|
|
SocketClient(ip, port)
|
|
----
|
|
|
|
include::../exceptions.adoc[]
|
|
|
|
include::../see.adoc[]
|