Skip to content

Commit

Permalink
Merge pull request #27 from TYuan0816/chore/version-bump
Browse files Browse the repository at this point in the history
  • Loading branch information
ianchen0119 authored Apr 21, 2024
2 parents 62d5670 + 17b9b22 commit 9f48006
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 77 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.18', '1.21' ]
go: ['1.21']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.18' ]
go: [ '1.21' ]
steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.45.2
version: v1.57.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/free5gc/ausf

go 1.17
go 1.21

require (
github.com/antihax/optional v1.0.0
Expand Down Expand Up @@ -36,7 +36,7 @@ require (
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
Expand Down
62 changes: 2 additions & 60 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions internal/sbi/producer/ue_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ func UeAuthPostRequestProcedure(updateAuthenticationInfo models.AuthenticationIn
var eapPkt radius.EapPacket
eapPkt.Code = radius.EapCode(1)
if updateAuthenticationInfo.ResynchronizationInfo == nil {
rand.Seed(time.Now().Unix())
randIdentifier := rand.Intn(256)
src := rand.NewSource(time.Now().UnixNano())
r := rand.New(src)
randIdentifier := r.Intn(256)
ausfUeContext.EapID = uint8(randIdentifier)
} else {
ausfUeContext.EapID = lastEapID + 1
Expand Down
4 changes: 2 additions & 2 deletions pkg/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package factory

import (
"fmt"
"io/ioutil"
"os"

"github.com/asaskevich/govalidator"
"gopkg.in/yaml.v2"
Expand All @@ -23,7 +23,7 @@ func InitConfigFactory(f string, cfg *Config) error {
f = AusfDefaultConfigPath
}

if content, err := ioutil.ReadFile(f); err != nil {
if content, err := os.ReadFile(f); err != nil {
return fmt.Errorf("[Factory] %+v", err)
} else {
logger.CfgLog.Infof("Read config from [%s]", f)
Expand Down
6 changes: 3 additions & 3 deletions pkg/service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package service

import (
"fmt"
"io/ioutil"
"io"
"os"
"os/signal"
"runtime/debug"
Expand Down Expand Up @@ -39,15 +39,15 @@ func (a *AusfApp) SetLogEnable(enable bool) {
logger.MainLog.Infof("Log enable is set to [%v]", enable)
if enable && logger.Log.Out == os.Stderr {
return
} else if !enable && logger.Log.Out == ioutil.Discard {
} else if !enable && logger.Log.Out == io.Discard {
return
}

a.cfg.SetLogEnable(enable)
if enable {
logger.Log.SetOutput(os.Stderr)
} else {
logger.Log.SetOutput(ioutil.Discard)
logger.Log.SetOutput(io.Discard)
}
}

Expand Down

0 comments on commit 9f48006

Please sign in to comment.