diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca8c454..d29c0b5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,4 @@ jobs: with: go-version: ${{ matrix.go-version }} - run: go test -v ./... - working-directory: scanner - run: go test -fuzz=FuzzScanner -fuzztime=30s ./... - working-directory: scanner diff --git a/scanner/constants.go b/constants.go similarity index 99% rename from scanner/constants.go rename to constants.go index 0293639..51361a5 100644 --- a/scanner/constants.go +++ b/constants.go @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package scanner +package css // Error token type is returned when there are errors in the parse. // diff --git a/scanner/doc.go b/doc.go similarity index 98% rename from scanner/doc.go rename to doc.go index 9e926d4..555923d 100644 --- a/scanner/doc.go +++ b/doc.go @@ -27,4 +27,4 @@ Following the CSS specification, an error can only occur when the scanner finds an unclosed quote or unclosed comment. Everything else is tokenizable and it is up to a parser to make sense of the token stream. */ -package scanner +package css diff --git a/scanner/fuzz_test.go b/fuzz_test.go similarity index 99% rename from scanner/fuzz_test.go rename to fuzz_test.go index 51b463c..3f839d5 100644 --- a/scanner/fuzz_test.go +++ b/fuzz_test.go @@ -1,4 +1,4 @@ -package scanner +package css import ( "bytes" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fe3f59f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/speedata/css + +go 1.24 diff --git a/scanner/scanner.go b/scanner.go similarity index 99% rename from scanner/scanner.go rename to scanner.go index 32c7c7d..c07a5b0 100644 --- a/scanner/scanner.go +++ b/scanner.go @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package scanner +package css import ( "strings" diff --git a/scanner/go.mod b/scanner/go.mod deleted file mode 100644 index 6e248bc..0000000 --- a/scanner/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/speedata/css/scanner - -go 1.24 diff --git a/scanner/scanner_extra_test.go b/scanner_extra_test.go similarity index 99% rename from scanner/scanner_extra_test.go rename to scanner_extra_test.go index c10b82a..1f97ee2 100644 --- a/scanner/scanner_extra_test.go +++ b/scanner_extra_test.go @@ -1,4 +1,4 @@ -package scanner +package css import ( "bytes" diff --git a/scanner/scanner_test.go b/scanner_test.go similarity index 99% rename from scanner/scanner_test.go rename to scanner_test.go index af056d4..7f3eb1d 100644 --- a/scanner/scanner_test.go +++ b/scanner_test.go @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package scanner +package css import ( "bytes" diff --git a/scanner/token.go b/token.go similarity index 99% rename from scanner/token.go rename to token.go index b0b7536..59c6949 100644 --- a/scanner/token.go +++ b/token.go @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package scanner +package css import ( "bytes"