File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
templates/swift/Sources/DeviceInfo/Linux Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -32,24 +32,24 @@ class LinuxDeviceInfo {
3232 machineId = getMachineId ( )
3333 }
3434
35- private func getOsRelease( ) -> [ String : String ] {
35+ private static func getOsRelease( ) -> [ String : String ] {
3636 return tryReadKeyValues ( path: " /etc/os-release " )
3737 }
3838
39- private func getLsbRelease( ) -> [ String : String ] {
39+ private static func getLsbRelease( ) -> [ String : String ] {
4040 return tryReadKeyValues ( path: " /etc/lsb-release " )
4141 }
4242
43- private func getMachineId( ) -> String {
43+ private static func getMachineId( ) -> String {
4444 return tryReadValue ( path: " /etc/machine-id " ) !
4545 }
4646
47- private func tryReadValue( path: String ) -> String ? {
47+ private static func tryReadValue( path: String ) -> String ? {
4848 let url = URL ( fileURLWithPath: path)
4949 return try ! String ( contentsOf: url, encoding: . utf8)
5050 }
5151
52- private func tryReadKeyValues( path: String ) -> [ String : String ] {
52+ private static func tryReadKeyValues( path: String ) -> [ String : String ] {
5353 let url = URL ( fileURLWithPath: path)
5454 let string = try ! String ( contentsOf: url, encoding: . utf8)
5555 let lines = string. components ( separatedBy: . newlines)
You can’t perform that action at this time.
0 commit comments