|
| 1 | +package basic |
| 2 | + |
| 3 | +import ( |
| 4 | + "github.com/devlights/try-golang/advanced/sets" |
| 5 | + "github.com/devlights/try-golang/basic/array_" |
| 6 | + "github.com/devlights/try-golang/basic/builtin_" |
| 7 | + "github.com/devlights/try-golang/basic/comments" |
| 8 | + "github.com/devlights/try-golang/basic/constants" |
| 9 | + "github.com/devlights/try-golang/basic/defer_" |
| 10 | + "github.com/devlights/try-golang/basic/error_" |
| 11 | + "github.com/devlights/try-golang/basic/functions" |
| 12 | + "github.com/devlights/try-golang/basic/helloworld" |
| 13 | + "github.com/devlights/try-golang/basic/import_" |
| 14 | + "github.com/devlights/try-golang/basic/interface_" |
| 15 | + "github.com/devlights/try-golang/basic/io_" |
| 16 | + "github.com/devlights/try-golang/basic/iota_" |
| 17 | + "github.com/devlights/try-golang/basic/literals" |
| 18 | + "github.com/devlights/try-golang/basic/log_" |
| 19 | + "github.com/devlights/try-golang/basic/map_" |
| 20 | + "github.com/devlights/try-golang/basic/math_" |
| 21 | + "github.com/devlights/try-golang/basic/os_" |
| 22 | + "github.com/devlights/try-golang/basic/runtime_" |
| 23 | + "github.com/devlights/try-golang/basic/scope" |
| 24 | + "github.com/devlights/try-golang/basic/slice_" |
| 25 | + "github.com/devlights/try-golang/basic/sort_" |
| 26 | + "github.com/devlights/try-golang/basic/stdin" |
| 27 | + "github.com/devlights/try-golang/basic/stdout" |
| 28 | + "github.com/devlights/try-golang/basic/strconv_" |
| 29 | + "github.com/devlights/try-golang/basic/string_" |
| 30 | + "github.com/devlights/try-golang/basic/struct_" |
| 31 | + "github.com/devlights/try-golang/basic/time_" |
| 32 | + "github.com/devlights/try-golang/basic/type_" |
| 33 | + "github.com/devlights/try-golang/basic/unsafe_" |
| 34 | + "github.com/devlights/try-golang/basic/variables" |
| 35 | + "github.com/devlights/try-golang/interfaces" |
| 36 | +) |
| 37 | + |
| 38 | +type ( |
| 39 | + basicExampleRegister struct{} |
| 40 | +) |
| 41 | + |
| 42 | +// NewRegister は、basic パッケージ用の lib.Register を返します. |
| 43 | +func NewRegister() interfaces.Register { |
| 44 | + r := new(basicExampleRegister) |
| 45 | + return r |
| 46 | +} |
| 47 | + |
| 48 | +func (r *basicExampleRegister) Regist(m interfaces.SampleMapping) { |
| 49 | + m["builtin_print"] = builtin_.PrintFunc |
| 50 | + m["error_basic"] = error_.Basic |
| 51 | + m["error_sentinel"] = error_.Sentinel |
| 52 | + m["error_typeassertion"] = error_.TypeAssertion |
| 53 | + m["error_wrap_unwrap"] = error_.WrapAndUnwrap |
| 54 | + m["helloworld"] = helloworld.HelloWorld |
| 55 | + m["printf01"] = stdout.Printf01 |
| 56 | + m["printf02"] = stdout.Printf02 |
| 57 | + m["printf03"] = stdout.Printf03 |
| 58 | + m["println01"] = stdout.Println01 |
| 59 | + m["scanner01"] = stdin.Scanner01 |
| 60 | + m["map_basic"] = map_.MapBasic |
| 61 | + m["map_for"] = map_.MapFor |
| 62 | + m["map_initialize"] = map_.MapInitialize |
| 63 | + m["map_delete"] = map_.MapDelete |
| 64 | + m["map_access"] = map_.MapAccess |
| 65 | + m["scope01"] = scope.Scope01 |
| 66 | + m["import01"] = import_.Import01 |
| 67 | + m["iota01"] = iota_.Iota01 |
| 68 | + m["fileio01"] = io_.FileIo01 |
| 69 | + m["fileio02"] = io_.FileIo02 |
| 70 | + m["fileio03"] = io_.FileIo03 |
| 71 | + m["fileio04"] = io_.FileIo04 |
| 72 | + m["interface_basic"] = interface_.Basic |
| 73 | + m["interface_composition"] = interface_.Composition |
| 74 | + m["interface_ducktyping"] = interface_.DuckTyping |
| 75 | + m["os01"] = os_.Os01 |
| 76 | + m["runtime01"] = runtime_.Runtime01 |
| 77 | + m["struct01"] = struct_.Struct01 |
| 78 | + m["struct02"] = struct_.Struct02 |
| 79 | + m["struct03"] = struct_.Struct03 |
| 80 | + m["struct04"] = struct_.Struct04 |
| 81 | + m["struct_anonymous_struct"] = struct_.StructAnonymousStruct |
| 82 | + m["struct_empty_struct"] = struct_.EmptyStruct |
| 83 | + m["array01"] = array_.Array01 |
| 84 | + m["slice01"] = slice_.Slice01 |
| 85 | + m["slice02"] = slice_.Slice02 |
| 86 | + m["slice03"] = slice_.Slice03 |
| 87 | + m["slice04"] = slice_.Slice04 |
| 88 | + m["slice05"] = slice_.Slice05 |
| 89 | + m["slice_reverse"] = slice_.SliceReverse |
| 90 | + m["slice_append"] = slice_.SliceAppend |
| 91 | + m["slice_pointer"] = slice_.SlicePointer |
| 92 | + m["slice_copy"] = slice_.SliceCopy |
| 93 | + m["slice_clear"] = slice_.SliceClear |
| 94 | + m["comment01"] = comments.Comment01 |
| 95 | + m["string_rune_rawstring"] = string_.StringRuneRawString |
| 96 | + m["string_to_runeslice"] = string_.StringToRuneSlice |
| 97 | + m["string_rune_byte_convert"] = string_.StringRuneByteConvert |
| 98 | + m["mapset01"] = sets.MapSet01 |
| 99 | + m["defer01"] = defer_.Defer01 |
| 100 | + m["var_statement_declare"] = variables.VarStatementDeclares |
| 101 | + m["package_scope_variable"] = variables.PackageScopeVariable |
| 102 | + m["short_assignment_statement"] = variables.ShortAssignmentStatement |
| 103 | + m["const_statement_declare"] = constants.ConstStatementDeclares |
| 104 | + m["function_one_return_value"] = functions.FunctionOneReturnValue |
| 105 | + m["function_multi_return_value"] = functions.FunctionMultiReturnValue |
| 106 | + m["function_named_return_value"] = functions.FunctionNamedReturnValue |
| 107 | + m["type01"] = type_.Type01 |
| 108 | + m["minmax"] = math_.MinMax |
| 109 | + m["binary_int_literals"] = literals.BinaryIntLiterals |
| 110 | + m["octal_int_literals"] = literals.OctalIntLiterals |
| 111 | + m["hex_int_literals"] = literals.HexIntLiterals |
| 112 | + m["digit_separator"] = literals.DigitSeparators |
| 113 | + m["time_since"] = time_.TimeSince |
| 114 | + m["time_after"] = time_.TimeAfter |
| 115 | + m["time_unix_to_time"] = time_.TimeUnixToTime |
| 116 | + m["time_now"] = time_.TimeNow |
| 117 | + m["time_parse"] = time_.TimeParse |
| 118 | + m["hex_to_decimal_convert"] = strconv_.HexToDecimalConvert |
| 119 | + m["unsafe_sizeof"] = unsafe_.Sizeof |
| 120 | + m["log_flags"] = log_.Flags |
| 121 | + m["log_prefix"] = log_.Prefix |
| 122 | + m["log_sentry_basic"] = log_.SentryBasic |
| 123 | + m["log_sentry_goroutine_bad"] = log_.SentryGoroutineBad |
| 124 | + m["log_sentry_goroutine_good"] = log_.SentryGoroutineGood |
| 125 | + m["log_output"] = log_.Output |
| 126 | + m["log_new"] = log_.NewLogger |
| 127 | + m["sort_interface"] = sort_.SortInterface |
| 128 | +} |
0 commit comments