// Copyright 2020 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packageosutilimport("os""testing""github.com/stretchr/testify/assert""gogs.io/gogs/internal/errutil")funcTestError_NotFound(t*testing.T){tests:=[]struct{errerrorexpValbool}{{err:os.ErrNotExist,expVal:true},{err:os.ErrClosed,expVal:false},}for_,test:=rangetests{t.Run("",func(t*testing.T){assert.Equal(t,test.expVal,errutil.IsNotFound(NewError(test.err)))})}}