profile
viewpoint
jeromewu jeromewu ByteDance Singapore https://www.linkedin.com/in/wenchiehwu/ A technology enthusiast wishes to make the world better and better.

ffmpegwasm/ffmpeg.wasm 6493

FFmpeg for browser and node, powered by WebAssembly

dunnock/react-sigma 233

Lightweight React library for drawing network graphs built on top of SigmaJS

ffmpegwasm/ffmpeg.wasm-core 192

Mirror of git://source.ffmpeg.org/ffmpeg.git

jeromewu/actions-cheat-sheet 9

A cheat sheet for github actions

jeromewu/create-react-app-gitpod 7

Use gitpod in a create-react-app based project

jeromewu/apimonitor 2

Android API Monitor

jeromewu/bazel-wasm-example 2

[WIP] An example to compile c++ code to WebAssembly using Bazel

jeromewu/fgo-calc 2

Calculator for FGO events

ffmpegwasm/x264 1

Clone from https://code.videolan.org/videolan/x264

jeromewu/bitcoin-opennet 1

An opennet gcoin project

push eventjeromewu/aoc2021-rust

Jerome Wu

commit sha c440d3652ba45878ae5a2eac419fa615b9483c44

Add usage in README.md

view details

push time in 5 days

push eventjeromewu/aoc2021-rust

Jerome Wu

commit sha d5b5c58ee828fc64c095259927e7d214f81da67b

Add README.md

view details

push time in 5 days

create barnchjeromewu/aoc2021-rust

branch : main

created branch time in 5 days

created repositoryjeromewu/aoc2021-rust

AoC 2021 solution in rust

created time in 5 days

push eventjeromewu/dotfiles

Jerome Wu

commit sha 7996513fa5f60c5de84d5486b4dad7c65ef3edb5

Update vim-go settings

view details

push time in 6 days

push eventjeromewu/dotfiles

Jerome Wu

commit sha 7a21196e449a377a59910b7bf0afa037fcc4b8af

Enable bookmarks in vim-airline

view details

push time in 20 days

push eventjeromewu/dotfiles

Jerome Wu

commit sha c021ce3dc44b9448e20cddb4924d5270cd2f3e4b

Add vim-bookmarks

view details

push time in 20 days

push eventjeromewu/dotfiles

Jerome Wu

commit sha ca02de727ef8a2a1557b9188ecdb0796370a0ffd

Use nvim as ZVM default editor

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 81ca3c8973a5b8e40ba1d91e0b345b63dd7d04f7

Fix a bug in zshrc

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha e0dccead18ef3b8af7e01064c987944db90e832f

Remove custom key binding and enable vi mode in tmux

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha f5a06777f60d50f55118b6029d9399d5100933e3

Update zshrc

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 956cc86ad671554507e5377d9929c4d9f5be5336

Enable gofumpt in vim-go

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha c93b579e9c00b58b340e122ea408e36f5b3a07cd

Remove expand tab

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 32bf45dfd4f3fd2bb818ceda64540e74e82b05c5

Update ale and vim-go settings

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 6d44dff85d4828404e9932e11623370687f1cdf6

Use ale w/ golangci-lint instead of coc

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 81954fc08dad8fec50d16d2440c78d92e44b8aba

Add terminal mappings

view details

push time in a month

push eventjeromewu/dotfiles

Jerome Wu

commit sha 3c8e89d146b90630022303cbe66ea70f85322c22

Update various settings

view details

push time in 2 months

push eventjeromewu/dotfiles

Jerome Wu

commit sha 024f1cbb670aea1386ec8ed7b996838023413179

Remove neomake

view details

push time in 2 months

push eventjeromewu/dotfiles

Jerome Wu

commit sha 038152820e220a7de62c990b8f552cb39d0faf5f

Update tmux local file

view details

push time in 2 months

push eventjeromewu/dotfiles

Jerome Wu

commit sha c45718034dc5a0882eadacf63268a1420af7f8c0

Re-struct nvim configs

view details

push time in 2 months

issue openedcodeday-labs/bookworms

Defer after error handling

There was a mistake for the place of calling defer func.

Take this one as an example:

	DB, err := db.DB()

	defer func() {
		if err := DB.Client().Disconnect(db.Ctx); err != nil {
			panic(err)
		}
	}()

	if err != nil {
		return nil, err
	}

As DB becomes nil when there is an error, this will cause a panic (nil pointer dereference) in defer func and it is not an expected behavior, so the defer should go after error handling:

	DB, err := db.DB()

	if err != nil {
		return nil, err
	}

        defer func() {
		if err := DB.Client().Disconnect(db.Ctx); err != nil {
			panic(err)
		}
	}()

I must be confused with other cases, and hope this correction can help you in the future.

created time in 2 months

push eventjeromewu/jeromewu.github.io

Jerome Wu

commit sha f8ba812f3edf92e758e53357d72688f11f69bf0d

Update resume

view details

push time in 2 months

more