rspec/rules/S1313/go/rule.adoc
2020-06-30 17:16:12 +02:00

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[]