  In this paper, based on the theory of defining sets, a class of four-weight
or five-weight linear codes over Fp is constructed. The complete weight
enumerators of the linear codes are determined by means of Weil sums. In some
case, there is an almost optimal code with respect to Griesmer bound, which is
also an optimal one according to the online code table. This is an extension of
the results raised by Zhang et al.(2020).
