介绍
在这个挑战中,你将开发一个基于切片的日志过滤函数,用于处理和提取相关的日志消息。在快节奏的网络安全领域,高效的日志过滤对于识别潜在的安全威胁至关重要。目标是实现 filterLogs
函数,根据给定的关键字过滤日志消息,同时确保函数区分大小写,并能够优雅地处理空切片和关键字。此外,该函数应仅返回消息内容,排除时间戳或其他元数据。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
go(("Golang")) -.-> go/DataTypesandStructuresGroup(["Data Types and Structures"])
go(("Golang")) -.-> go/FunctionsandControlFlowGroup(["Functions and Control Flow"])
go/DataTypesandStructuresGroup -.-> go/strings("Strings")
go/DataTypesandStructuresGroup -.-> go/slices("Slices")
go/FunctionsandControlFlowGroup -.-> go/for("For")
subgraph Lab Skills
go/strings -.-> lab-436686{{"切片日志过滤挑战"}}
go/slices -.-> lab-436686{{"切片日志过滤挑战"}}
go/for -.-> lab-436686{{"切片日志过滤挑战"}}
end