gogf / gf

Compare 038e036 ... +6 ... aa416d2

Coverage Reach
container/garray/garray_normal_any.go container/garray/garray_normal_str.go container/garray/garray_normal_int.go container/garray/garray_sorted_any.go container/garray/garray_sorted_str.go container/garray/garray_sorted_int.go container/garray/garray_func.go container/gmap/gmap_list_map.go container/gmap/gmap_hash_int_any_map.go container/gmap/gmap_hash_any_any_map.go container/gmap/gmap_hash_str_int_map.go container/gmap/gmap_hash_int_int_map.go container/gmap/gmap_hash_int_str_map.go container/gmap/gmap_hash_str_str_map.go container/gmap/gmap_hash_str_any_map.go container/gmap/gmap.go container/gmap/gmap_tree_map.go container/gtree/gtree_redblacktree.go container/gtree/gtree_btree.go container/gtree/gtree_avltree.go container/gset/gset_any_set.go container/gset/gset_str_set.go container/gset/gset_int_set.go container/gtype/gtype_bool.go container/gtype/gtype_bytes.go container/gtype/gtype_float32.go container/gtype/gtype_float64.go container/gtype/gtype_string.go container/gtype/gtype_interface.go container/gtype/gtype_byte.go container/gtype/gtype_uint.go container/gtype/gtype_int.go container/gtype/gtype_int32.go container/gtype/gtype_int64.go container/gtype/gtype_uint32.go container/gtype/gtype_uint64.go container/gtype/gtype.go container/glist/glist.go container/gvar/gvar.go container/gvar/gvar_map.go container/gvar/gvar_slice.go container/gvar/gvar_is.go container/gvar/gvar_list.go container/gvar/gvar_struct.go container/gvar/gvar_scan.go container/gring/gring.go container/gpool/gpool.go container/gqueue/gqueue.go os/glog/glog_logger.go os/glog/glog_logger_rotate.go os/glog/glog_logger_chaining.go os/glog/glog_logger_config.go os/glog/glog_logger_handler.go os/glog/glog_logger_api.go os/glog/glog_config.go os/glog/glog_api.go os/glog/glog_chaining.go os/glog/glog_logger_level.go os/glog/glog_logger_handler_json.go os/glog/glog_instance.go os/glog/glog.go os/glog/glog_logger_color.go os/glog/glog_logger_writer.go os/gcmd/gcmd_command_object.go os/gcmd/gcmd_command_help.go os/gcmd/gcmd_command_run.go os/gcmd/gcmd_parser.go os/gcmd/gcmd.go os/gcmd/gcmd_command.go os/gcmd/gcmd_scan.go os/gcache/gcache_adapter_redis.go os/gcache/gcache_adapter_memory.go os/gcache/gcache_adapter_memory_data.go os/gcache/gcache.go os/gcache/gcache_cache_must.go os/gcache/gcache_adapter_memory_lru.go os/gcache/gcache_cache.go os/gcache/gcache_adapter_memory_expire_sets.go os/gcache/gcache_adapter_memory_expire_times.go os/gcache/gcache_adapter_memory_item.go os/gfile/gfile.go os/gfile/gfile_contents.go os/gfile/gfile_size.go os/gfile/gfile_copy.go os/gfile/gfile_scan.go os/gfile/gfile_home.go os/gfile/gfile_source.go os/gfile/gfile_cache.go os/gfile/gfile_search.go os/gfile/gfile_replace.go os/gfile/gfile_time.go os/gfile/gfile_sort.go os/gview/gview_parse.go os/gview/gview_buildin.go os/gview/gview_config.go os/gview/gview.go os/gview/gview_i18n.go os/gview/gview_instance.go os/gview/gview_error.go os/gtime/gtime_time.go os/gtime/gtime.go os/gtime/gtime_format.go os/gtime/gtime_time_zone.go os/gtime/gtime_sql.go os/gtime/gtime_time_wrapper.go os/gsession/gsession_session.go os/gsession/gsession_storage_file.go os/gsession/gsession_storage_redis_hashtable.go os/gsession/gsession_storage_redis.go os/gsession/gsession_manager.go os/gsession/gsession_storage_memory.go os/gsession/gsession_storage_base.go os/gsession/gsession.go os/gproc/gproc_process.go os/gproc/gproc_shell.go os/gproc/gproc_comm_receive.go os/gproc/gproc_manager.go os/gproc/gproc.go os/gproc/gproc_comm.go os/gproc/gproc_signal.go os/gproc/gproc_comm_send.go os/gproc/gproc_must.go os/gres/gres_resource.go os/gres/gres_func_zip.go os/gres/gres_func.go os/gres/gres_http_file.go os/gres/gres_file.go os/gres/gres.go os/gres/gres_instance.go os/gres/testdata/data/data.go os/gcron/gcron_schedule.go os/gcron/gcron_cron.go os/gcron/gcron_entry.go os/gcron/gcron.go os/gcron/gcron_schedule_fix.go os/gcfg/gcfg_adapter_file_path.go os/gcfg/gcfg_adapter_file.go os/gcfg/gcfg.go os/gcfg/gcfg_adapter_file_content.go os/gstructs/gstructs_tag.go os/gstructs/gstructs_field.go os/gstructs/gstructs_field_tag.go os/gstructs/gstructs_type.go os/gfsnotify/gfsnotify_watcher.go os/gfsnotify/gfsnotify_watcher_loop.go os/gfsnotify/gfsnotify_filefunc.go os/gfsnotify/gfsnotify.go os/gfsnotify/gfsnotify_event.go os/gtimer/gtimer_timer.go os/gtimer/gtimer_entry.go os/gtimer/gtimer_timer_loop.go os/gtimer/gtimer.go os/gtimer/gtimer_queue.go os/gtimer/gtimer_queue_heap.go os/gtimer/gtimer_exit.go os/gspath/gspath.go os/gspath/gspath_cache.go os/gmutex/gmutex.go os/gfpool/gfpool_pool.go os/gfpool/gfpool_file.go os/grpool/grpool.go os/grpool/grpool_supervisor.go os/genv/genv.go os/genv/genv_must.go os/gmlock/gmlock_locker.go os/gmlock/gmlock.go os/gbuild/gbuild.go os/gctx/gctx.go net/ghttp/ghttp_server.go net/ghttp/ghttp_server_router_group.go net/ghttp/ghttp_server_router.go net/ghttp/ghttp_server_handler.go net/ghttp/ghttp_server_service_object.go net/ghttp/ghttp_request_param.go net/ghttp/ghttp_server_admin_process.go net/ghttp/ghttp_server_config.go net/ghttp/ghttp_server_router_serve.go net/ghttp/ghttp_server_graceful.go net/ghttp/ghttp_server_service_handler.go net/ghttp/ghttp_request.go net/ghttp/ghttp_request_param_request.go net/ghttp/ghttp_server_cookie.go net/ghttp/ghttp_request_middleware.go net/ghttp/ghttp_response_write.go net/ghttp/ghttp_server_domain.go net/ghttp/ghttp_request_param_query.go net/ghttp/ghttp_response.go net/ghttp/ghttp_server_config_static.go net/ghttp/ghttp_request_param_file.go net/ghttp/ghttp_response_cors.go net/ghttp/ghttp_server_pprof.go net/ghttp/ghttp_server_router_hook.go net/ghttp/ghttp_request_param_form.go net/ghttp/ghttp_middleware_tracing.go net/ghttp/ghttp_server_admin.go net/ghttp/ghttp_server_log.go net/ghttp/ghttp_response_view.go net/ghttp/ghttp_server_registry.go net/ghttp/ghttp_request_param_page.go net/ghttp/ghttp_request_auth.go net/ghttp/ghttp_server_router_middleware.go net/ghttp/ghttp_middleware_handler_response.go net/ghttp/ghttp_server_config_logging.go net/ghttp/ghttp_server_openapi.go net/ghttp/ghttp_response_writer.go net/ghttp/ghttp_server_admin_unix.go net/ghttp/ghttp_request_param_ctx.go net/ghttp/ghttp_server_config_cookie.go net/ghttp/ghttp_func.go net/ghttp/ghttp_request_view.go net/ghttp/ghttp_request_param_param.go net/ghttp/ghttp_server_status.go net/ghttp/ghttp_request_param_router.go net/ghttp/ghttp_server_config_session.go net/ghttp/ghttp_server_swagger.go net/ghttp/ghttp_server_config_mess.go net/ghttp/ghttp_middleware_json_body.go net/ghttp/ghttp_server_util.go net/ghttp/ghttp_server_config_route.go net/ghttp/ghttp.go net/ghttp/internal/swaggerui/swaggerui-redoc.go net/ghttp/testdata/https/packed/packed.go net/ghttp/ghttp_server_error_logger.go net/ghttp/ghttp_middleware_cors.go net/ghttp/ghttp_server_plugin.go net/goai/goai_path.go net/goai/goai_shema.go net/goai/goai.go net/goai/goai_shema_ref.go net/goai/goai_response_ref.go net/goai/goai_requestbody.go net/goai/goai_parameter_ref.go net/goai/goai_shemas.go net/goai/goai_parameter.go net/goai/goai_operation.go net/goai/goai_response.go net/goai/goai_external_docs.go net/goai/goai_config.go net/goai/goai_callback.go net/goai/goai_security.go net/goai/goai_header.go net/goai/goai_link.go net/goai/goai_example.go net/goai/goai_xextensions.go net/gclient/gclient_request.go net/gclient/gclient_config.go net/gclient/gclient_tracing_tracer.go net/gclient/gclient_discovery.go net/gclient/gclient.go net/gclient/gclient_tracing.go net/gclient/gclient_chain.go net/gclient/gclient_dump.go net/gclient/gclient_response.go net/gclient/gclient_request_obj.go net/gclient/gclient_bytes.go net/gclient/gclient_var.go net/gclient/gclient_content.go net/gclient/gclient_middleware.go net/gclient/gclient_websocket.go net/gtcp/gtcp_conn.go net/gtcp/gtcp_func.go net/gtcp/gtcp_conn_pkg.go net/gtcp/gtcp_server.go net/gtcp/gtcp_pool.go net/gtcp/gtcp_pool_pkg.go net/gtcp/gtcp_func_pkg.go net/gudp/gudp_conn.go net/gudp/gudp_func.go net/gudp/gudp_server.go net/gsvc/gsvc_service.go net/gsvc/gsvc_discovery.go net/gsvc/gsvc_endpoint.go net/gsvc/gsvc_registry.go net/gsvc/gsvc_endpoints.go net/gsvc/gsvc_metadata.go net/gsvc/gsvc.go net/gtrace/gtrace.go net/gtrace/gtrace_baggage.go net/gtrace/gtrace_carrier.go net/gtrace/internal/provider/provider.go net/gtrace/internal/provider/provider_idgenerator.go net/gtrace/gtrace_tracer.go net/gtrace/gtrace_span.go net/gipv4/gipv4_ip.go net/gipv4/gipv4_lookup.go net/gipv4/gipv4.go net/gipv4/gipv4_mac.go net/gsel/gsel_selector_least_connection.go net/gsel/gsel_selector_weight.go net/gsel/gsel_selector_random.go net/gsel/gsel_selector_round_robin.go net/gsel/gsel.go net/gsel/gsel_builder_least_connection.go net/gsel/gsel_builder_round_robin.go net/gsel/gsel_builder_random.go net/gsel/gsel_builder.go net/gsel/gsel_builder_weight.go net/gipv6/gipv6.go util/gconv/gconv_struct.go util/gconv/gconv_scan.go util/gconv/gconv_slice_uint.go util/gconv/gconv_slice_int.go util/gconv/gconv_map.go util/gconv/gconv_slice_float.go util/gconv/gconv_convert.go util/gconv/gconv.go util/gconv/gconv_slice_str.go util/gconv/gconv_structs.go util/gconv/gconv_maptomap.go util/gconv/gconv_slice_any.go util/gconv/gconv_maptomaps.go util/gconv/gconv_int.go util/gconv/gconv_uint.go util/gconv/gconv_maps.go util/gconv/gconv_time.go util/gconv/gconv_ptr.go util/gconv/gconv_float.go util/gconv/gconv_unsafe.go util/gvalid/internal/builtin/builtin_resident_id.go util/gvalid/internal/builtin/builtin_length.go util/gvalid/internal/builtin/builtin_required_unless.go util/gvalid/internal/builtin/builtin_required_if.go util/gvalid/internal/builtin/builtin_between.go util/gvalid/internal/builtin/builtin_bank_card.go util/gvalid/internal/builtin/builtin_different.go util/gvalid/internal/builtin/builtin_same.go util/gvalid/internal/builtin/builtin_date.go util/gvalid/internal/builtin/builtin_required_without.go util/gvalid/internal/builtin/builtin_date_format.go util/gvalid/internal/builtin/builtin_required_with.go util/gvalid/internal/builtin/builtin_required_without_all.go util/gvalid/internal/builtin/builtin_not_in.go util/gvalid/internal/builtin/builtin_required_with_all.go util/gvalid/internal/builtin/builtin_datetime.go util/gvalid/internal/builtin/builtin_lt.go util/gvalid/internal/builtin/builtin_gt.go util/gvalid/internal/builtin/builtin_lte.go util/gvalid/internal/builtin/builtin_gte.go util/gvalid/internal/builtin/builtin_required.go util/gvalid/internal/builtin/builtin_before.go util/gvalid/internal/builtin/builtin_after.go util/gvalid/internal/builtin/builtin_before_equal.go util/gvalid/internal/builtin/builtin_after_equal.go util/gvalid/internal/builtin/builtin_in.go util/gvalid/internal/builtin/builtin_password3.go util/gvalid/internal/builtin/builtin_size.go util/gvalid/internal/builtin/builtin_max_length.go util/gvalid/internal/builtin/builtin_array.go util/gvalid/internal/builtin/builtin_min_length.go util/gvalid/internal/builtin/builtin_ipv6.go util/gvalid/internal/builtin/builtin_max.go util/gvalid/internal/builtin/builtin_phone.go util/gvalid/internal/builtin/builtin_ipv4.go util/gvalid/internal/builtin/builtin_qq.go util/gvalid/internal/builtin/builtin_phone_loose.go util/gvalid/internal/builtin/builtin_password2.go util/gvalid/internal/builtin/builtin_passport.go util/gvalid/internal/builtin/builtin_mac.go util/gvalid/internal/builtin/builtin_telephone.go util/gvalid/internal/builtin/builtin_domain.go util/gvalid/internal/builtin/builtin_min.go util/gvalid/internal/builtin/builtin_ip.go util/gvalid/internal/builtin/builtin_postcode.go util/gvalid/internal/builtin/builtin_email.go util/gvalid/internal/builtin/builtin_url.go util/gvalid/internal/builtin/builtin_not_regex.go util/gvalid/internal/builtin/builtin_regex.go util/gvalid/internal/builtin/builtin_integer.go util/gvalid/internal/builtin/builtin_boolean.go util/gvalid/internal/builtin/builtin_password.go util/gvalid/internal/builtin/builtin_json.go util/gvalid/internal/builtin/builtin_float.go util/gvalid/internal/builtin/builtin_bail.go util/gvalid/internal/builtin/builtin_foreach.go util/gvalid/internal/builtin/builtin_ci.go util/gvalid/internal/builtin/builtin_not_eq.go util/gvalid/internal/builtin/builtin_eq.go util/gvalid/internal/builtin/builtin.go util/gvalid/gvalid_validator_check_struct.go util/gvalid/gvalid_validator_check_value.go util/gvalid/gvalid_error.go util/gvalid/gvalid_validator_check_map.go util/gvalid/gvalid_validator.go util/gvalid/gvalid_register.go util/gvalid/gvalid_validator_message.go util/gvalid/gvalid.go util/gutil/gutil_dump.go util/gutil/gutil.go util/gutil/gutil_list.go util/gutil/gutil_map.go util/gutil/gutil_comparator.go util/gutil/gutil_slice.go util/gutil/gutil_struct.go util/gutil/gutil_default.go util/gutil/gutil_copy.go util/gpage/gpage.go util/grand/grand.go util/grand/grand_buffer.go util/guid/guid.go util/gmode/gmode.go util/gtag/gtag_func.go util/gmeta/gmeta.go database/gdb/gdb_func.go database/gdb/gdb_model_select.go database/gdb/gdb_core.go database/gdb/gdb_type_result_scanlist.go database/gdb/gdb_core_underlying.go database/gdb/gdb_model_insert.go database/gdb/gdb_core_transaction.go database/gdb/gdb_core_structure.go database/gdb/gdb_model_with.go database/gdb/gdb.go database/gdb/gdb_model.go database/gdb/gdb_model_utility.go database/gdb/gdb_model_fields.go database/gdb/gdb_core_utility.go database/gdb/gdb_core_config.go database/gdb/gdb_model_time.go database/gdb/gdb_type_result.go database/gdb/gdb_model_cache.go database/gdb/gdb_model_update.go database/gdb/gdb_model_builder.go database/gdb/gdb_model_builder_where.go database/gdb/gdb_model_join.go database/gdb/gdb_model_builder_whereor.go database/gdb/gdb_model_delete.go database/gdb/gdb_model_builder_where_prefix.go database/gdb/gdb_statement.go database/gdb/gdb_core_trace.go database/gdb/gdb_model_builder_whereor_prefix.go database/gdb/gdb_model_hook.go database/gdb/gdb_driver_wrapper_db.go database/gdb/gdb_model_order_group.go database/gdb/gdb_model_where.go database/gdb/gdb_model_whereor.go database/gdb/gdb_model_where_prefix.go database/gdb/gdb_result.go database/gdb/gdb_model_whereor_prefix.go database/gdb/gdb_model_option.go database/gdb/gdb_type_record.go database/gdb/gdb_core_ctx.go database/gdb/gdb_schema.go database/gdb/gdb_driver_default.go database/gdb/gdb_driver_wrapper.go database/gdb/gdb_core_link.go database/gdb/gdb_model_lock.go database/gdb/gdb_model_transaction.go database/gredis/gredis_adapter_goredis.go database/gredis/gredis_adapter_goredis_conn.go database/gredis/gredis_config.go database/gredis/gredis_redis.go database/gredis/gredis_redis_conn.go database/gredis/gredis_redis_trace.go database/gredis/gredis_instance.go database/gredis/gredis.go database/gredis/gredis_subscription.go contrib/drivers/pgsql/pgsql.go contrib/drivers/pgsql/pgsql_result.go contrib/drivers/clickhouse/clickhouse.go contrib/drivers/dm/dm.go contrib/drivers/mssql/mssql.go contrib/drivers/oracle/oracle.go contrib/drivers/sqlite/sqlite.go contrib/drivers/mysql/mysql.go contrib/registry/polaris/polaris_registrar.go contrib/registry/polaris/polaris_discovery.go contrib/registry/polaris/polaris_watcher.go contrib/registry/polaris/polaris.go contrib/registry/polaris/polaris_service.go contrib/registry/zookeeper/zookeeper_registrar.go contrib/registry/zookeeper/zookeeper_watcher.go contrib/registry/zookeeper/zookeeper_discovery.go contrib/registry/zookeeper/zookeeper.go contrib/registry/zookeeper/zookeeper_func.go contrib/config/kubecm/kubecm.go contrib/config/kubecm/kubecm_kube.go contrib/config/apollo/apollo.go contrib/config/nacos/nacos.go encoding/gjson/gjson.go encoding/gjson/gjson_api_new_load.go encoding/gjson/gjson_api.go encoding/gjson/gjson_api_encoding.go encoding/gjson/gjson_stdlib_json_util.go encoding/gjson/gjson_implements.go encoding/gjson/gjson_api_config.go encoding/gbinary/gbinary_be.go encoding/gbinary/gbinary_le.go encoding/gbinary/gbinary.go encoding/gbinary/gbinary_bit.go encoding/gcompress/gcompress_zip.go encoding/gcompress/gcompress_gzip.go encoding/gcompress/gcompress_zlib.go encoding/ghash/ghash_pjw.go encoding/ghash/ghash_elf.go encoding/ghash/ghash_rs.go encoding/ghash/ghash_bkdr.go encoding/ghash/ghash_ap.go encoding/ghash/ghash_sdbm.go encoding/ghash/ghash_jshash.go encoding/ghash/ghash_djb.go encoding/gproperties/gproperties.go encoding/gini/gini.go encoding/gxml/gxml.go encoding/gbase64/gbase64.go encoding/ghtml/ghtml.go encoding/gcharset/gcharset.go encoding/gyaml/gyaml.go encoding/gurl/url.go encoding/gtoml/gtoml.go text/gstr/gstr_convert.go text/gstr/gstr_sub.go text/gstr/gstr_parse.go text/gstr/gstr_version.go text/gstr/gstr_similar.go text/gstr/gstr_case.go text/gstr/gstr_pos.go text/gstr/gstr_trim.go text/gstr/gstr_replace.go text/gstr/gstr_domain.go text/gstr/gstr_split_join.go text/gstr/gstr_count.go text/gstr/gstr_slashes.go text/gstr/gstr_upper_lower.go text/gstr/gstr_array.go text/gstr/gstr_contain.go text/gstr/gstr_compare.go text/gstr/gstr_length.go text/gstr/gstr_is.go text/gstr/gstr_create.go text/gregex/gregex.go text/gregex/gregex_cache.go internal/utils/utils_str.go internal/utils/utils_is.go internal/utils/utils_io.go internal/utils/utils_list.go internal/utils/utils_map.go internal/utils/utils_array.go internal/utils/utils_debug.go internal/empty/empty.go internal/deepcopy/deepcopy.go internal/command/command.go internal/intlog/intlog.go internal/reflection/reflection.go internal/httputil/httputils.go internal/json/json.go internal/rwmutex/rwmutex.go internal/mutex/mutex.go internal/fileinfo/fileinfo.go internal/tracing/tracing.go errors/gerror/gerror_error_stack.go errors/gerror/gerror_api_code.go errors/gerror/gerror_error.go errors/gerror/gerror_api_stack.go errors/gerror/gerror_api.go errors/gerror/gerror_error_format.go errors/gerror/gerror_error_code.go errors/gerror/gerror_api_option.go errors/gerror/gerror.go errors/gerror/gerror_error_json.go errors/gcode/gcode_local.go errors/gcode/gcode.go crypto/gdes/gdes.go crypto/gaes/gaes.go crypto/gmd5/gmd5.go crypto/gsha1/gsha1.go crypto/gcrc32/gcrc32.go frame/gins/gins_database.go frame/gins/gins_server.go frame/gins/gins_redis.go frame/gins/gins_view.go frame/gins/gins_log.go frame/gins/gins.go frame/gins/gins_httpclient.go frame/gins/gins_i18n.go frame/gins/gins_config.go frame/gins/gins_resource.go frame/g/g_object.go frame/g/g_func.go frame/g/g_setting.go test/gtest/gtest_util.go test/gtest/gtest_t.go i18n/gi18n/gi18n_manager.go i18n/gi18n/gi18n.go i18n/gi18n/gi18n_ctx.go i18n/gi18n/gi18n_instance.go debug/gdebug/gdebug_caller.go debug/gdebug/gdebug_stack.go debug/gdebug/gdebug_version.go debug/gdebug/gdebug_grid.go

Flags

Flags have been temporarily removed from this view while the flagging feature is refactored for better performance and user experience.

You can still use flags when viewing individual files. Flag-level thresholds will also remain on pull and merge requests in your repository provider.

More information can be found in our documentation.


@@ -86,7 +86,7 @@
Loading
86 86
		tableName = m.tablesInit
87 87
	}
88 88
	config := m.db.GetConfig()
89 -
	if config.UpdatedAt != "" {
89 +
	if config.DeletedAt != "" {
90 90
		return m.getSoftFieldName(tableName, []string{config.DeletedAt})
91 91
	}
92 92
	return m.getSoftFieldName(tableName, deletedFiledNames)

@@ -8,7 +8,6 @@
Loading
8 8
9 9
import (
10 10
	"context"
11 -
	"time"
12 11
13 12
	"github.com/gogf/gf/v2/container/glist"
14 13
	"github.com/gogf/gf/v2/container/gmap"
@@ -35,7 +34,6 @@
Loading
35 34
		rawList: glist.New(true),
36 35
		closed:  gtype.NewBool(),
37 36
	}
38 -
	gtimer.AddSingleton(context.Background(), time.Second, lru.SyncAndClear)
39 37
	return lru
40 38
}
41 39

@@ -50,34 +50,35 @@
Loading
50 50
	if src == dst {
51 51
		return nil
52 52
	}
53 -
	in, err := Open(src)
53 +
	var inFile *os.File
54 +
	inFile, err = Open(src)
54 55
	if err != nil {
55 56
		return
56 57
	}
57 58
	defer func() {
58 -
		if e := in.Close(); e != nil {
59 +
		if e := inFile.Close(); e != nil {
59 60
			err = gerror.Wrapf(e, `file close failed for "%s"`, src)
60 61
		}
61 62
	}()
62 -
	out, err := Create(dst)
63 +
	var outFile *os.File
64 +
	outFile, err = Create(dst)
63 65
	if err != nil {
64 66
		return
65 67
	}
66 68
	defer func() {
67 -
		if e := out.Close(); e != nil {
69 +
		if e := outFile.Close(); e != nil {
68 70
			err = gerror.Wrapf(e, `file close failed for "%s"`, dst)
69 71
		}
70 72
	}()
71 -
	if _, err = io.Copy(out, in); err != nil {
73 +
	if _, err = io.Copy(outFile, inFile); err != nil {
72 74
		err = gerror.Wrapf(err, `io.Copy failed from "%s" to "%s"`, src, dst)
73 75
		return
74 76
	}
75 -
	if err = out.Sync(); err != nil {
77 +
	if err = outFile.Sync(); err != nil {
76 78
		err = gerror.Wrapf(err, `file sync failed for file "%s"`, dst)
77 79
		return
78 80
	}
79 -
	err = Chmod(dst, DefaultPermCopy)
80 -
	if err != nil {
81 +
	if err = Chmod(dst, DefaultPermCopy); err != nil {
81 82
		return
82 83
	}
83 84
	return

@@ -427,14 +427,17 @@
Loading
427 427
		}
428 428
	}
429 429
	// Processing expired keys from LRU.
430 -
	if c.cap > 0 && c.lruGetList.Len() > 0 {
431 -
		for {
432 -
			if v := c.lruGetList.PopFront(); v != nil {
433 -
				c.lru.Push(v)
434 -
			} else {
435 -
				break
430 +
	if c.cap > 0 {
431 +
		if c.lruGetList.Len() > 0 {
432 +
			for {
433 +
				if v := c.lruGetList.PopFront(); v != nil {
434 +
					c.lru.Push(v)
435 +
				} else {
436 +
					break
437 +
				}
436 438
			}
437 439
		}
440 +
		c.lru.SyncAndClear(ctx)
438 441
	}
439 442
	// ========================
440 443
	// Data Cleaning up.

Learn more Showing 1 files with coverage changes found.

Changes in os/gcache/gcache_adapter_memory_lru.go
New
Loading file...
Files Coverage
container 95.54%
contrib 67.19%
crypto 80.86%
database -0.05% 70.95%
debug/gdebug 81.52%
encoding 81.49%
errors 91.65%
frame 61.10%
i18n/gi18n 79.72%
internal 81.93%
net 65.10%
os 0.01% 72.87%
test/gtest 70.36%
text 89.54%
util 88.03%
Project Totals (589 files) 78.89%
Loading