The government yesterday said it went into debt during December at a slower rate than a year ago, marking the second month in a row of a shrinking budget deficit. The trend isn't expected to continue, however.

Treasury Department spending for December amounted to $31.9 billion compared with revenues of $29.5 billion. That left a deficit of $2.4 billion compared with a $5.9 billion deficit for the same month a year ago.

The November deficit of $7.4 billion compared with a $8.7 billion deficit the same month a year ago.

So far this fiscal year, which started in October, the budget is $22.8 billion in the red. That's off by $4 billion from the deficit for the comparable three months in 1975.

The smaller October-December budget deficit this year compared with last year is due primarily to a $9 billion increase in tax revenues. On the outlay side, unemployment compensation payments of $3.4 billion over the three months represent a drop of $932 million from last year. That saving is more than offset, however, by advances in Social Security payments, which are up about $2 billion to about $18 billion, and interest on the public debt, which is up $1.5 billion to $12.4 billion.