type_assertion.go

Go上級

Explorer

C40
C++40
C#40
Dart40
Go
初級10
中級10
上級10
context_usage.go
type_assertion.go
error_handler.go
goroutine_channel.go
defer_usage.go
struct_method.go
interface_impl.go
slice_operations.go
map_check.go
select_statement.go
エキスパート5
マスター5
Java40
JavaScript40
Kotlin40
Objective-C40
Perl40
PHP40
Python40
R40
Ruby40
Rust40
Shell40
Swift40
TypeScript40
type_assertion.go
Click to focus
1
2
3
4
5
6
7
8
9
10
func convert(v interface{}) string {
   switch val := v.(type) {
   case string:
       return val
   case int:
       return fmt.Sprintf("%d", val)
   default:
       return ""
   }
}
0WPM0%0:000/184(0%)|Ln 1, Col 1
UTF-8Go

関連する練習問題