rspec/rules/S1313/go/rule.adoc

39 lines
541 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
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[]
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]